File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/material-renderers/src Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,14 @@ import { EnumCellProps, WithClassname } from '@jsonforms/core';
28
28
import { MenuItem , Select } from '@mui/material' ;
29
29
import merge from 'lodash/merge' ;
30
30
import { TranslateProps } from '@jsonforms/react' ;
31
- import { i18nDefaults , WithInputProps } from '../util' ;
31
+ import { i18nDefaults , WithInputProps , WithSelectProps } from '../util' ;
32
32
33
33
export const MuiSelect = React . memo ( function MuiSelect (
34
- props : EnumCellProps & WithClassname & TranslateProps & WithInputProps
34
+ props : EnumCellProps &
35
+ WithClassname &
36
+ TranslateProps &
37
+ WithInputProps &
38
+ WithSelectProps
35
39
) {
36
40
const {
37
41
data,
@@ -46,6 +50,7 @@ export const MuiSelect = React.memo(function MuiSelect(
46
50
config,
47
51
label,
48
52
t,
53
+ multiple,
49
54
} = props ;
50
55
const appliedUiSchemaOptions = merge ( { } , config , uischema . options ) ;
51
56
const noneOptionLabel = useMemo (
@@ -63,6 +68,7 @@ export const MuiSelect = React.memo(function MuiSelect(
63
68
value = { data !== undefined ? data : '' }
64
69
onChange = { ( ev ) => handleChange ( path , ev . target . value || undefined ) }
65
70
fullWidth = { true }
71
+ multiple = { multiple || false }
66
72
>
67
73
{ [
68
74
< MenuItem value = { '' } key = 'jsonforms.enum.none' >
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ export interface WithInputProps {
46
46
label ?: string ;
47
47
}
48
48
49
+ export interface WithSelectProps {
50
+ multiple ?: boolean ;
51
+ }
52
+
49
53
const variantToInput = {
50
54
standard : Input ,
51
55
filled : FilledInput ,
You can’t perform that action at this time.
0 commit comments