more flexibele code

This commit is contained in:
casperlamboo 2017-11-16 23:54:05 +01:00
parent 8c546e31b3
commit ed8ccd3f68

View File

@ -36,7 +36,7 @@ SettingsGroup.propTypes = {
export const SelectField = (props, context) => ( export const SelectField = (props, context) => (
<MaterialUISelectField <MaterialUISelectField
{ ...props } { ...props }
value={context.state[props.name]} value={_.get(context.state, props.name)}
onChange={(event, index, value) => context.onChange(props.name, value)} onChange={(event, index, value) => context.onChange(props.name, value)}
/> />
); );