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';
2828import { MenuItem , Select } from '@mui/material' ;
2929import merge from 'lodash/merge' ;
3030import { TranslateProps } from '@jsonforms/react' ;
31- import { i18nDefaults , WithInputProps } from '../util' ;
31+ import { i18nDefaults , WithInputProps , WithSelectProps } from '../util' ;
3232
3333export const MuiSelect = React . memo ( function MuiSelect (
34- props : EnumCellProps & WithClassname & TranslateProps & WithInputProps
34+ props : EnumCellProps &
35+ WithClassname &
36+ TranslateProps &
37+ WithInputProps &
38+ WithSelectProps
3539) {
3640 const {
3741 data,
@@ -46,6 +50,7 @@ export const MuiSelect = React.memo(function MuiSelect(
4650 config,
4751 label,
4852 t,
53+ multiple,
4954 } = props ;
5055 const appliedUiSchemaOptions = merge ( { } , config , uischema . options ) ;
5156 const noneOptionLabel = useMemo (
@@ -63,6 +68,7 @@ export const MuiSelect = React.memo(function MuiSelect(
6368 value = { data !== undefined ? data : '' }
6469 onChange = { ( ev ) => handleChange ( path , ev . target . value || undefined ) }
6570 fullWidth = { true }
71+ multiple = { multiple || false }
6672 >
6773 { [
6874 < MenuItem value = { '' } key = 'jsonforms.enum.none' >
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ export interface WithInputProps {
4646 label ?: string ;
4747}
4848
49+ export interface WithSelectProps {
50+ multiple ?: boolean ;
51+ }
52+
4953const variantToInput = {
5054 standard : Input ,
5155 filled : FilledInput ,
You can’t perform that action at this time.
0 commit comments