Contact edit: fix changing subfield types.

master
Tom Hacohen 6 years ago
parent 31bb36187a
commit 4d386f5a0a

@ -87,7 +87,6 @@ const ValueTypeComponent = (props: ValueTypeComponentProps) => {
<React.Fragment> <React.Fragment>
<TextField <TextField
type={props.type} type={props.type}
name={props.name}
placeholder={props.placeholder} placeholder={props.placeholder}
style={props.style} style={props.style}
value={props.value.value} value={props.value.value}
@ -103,7 +102,9 @@ const ValueTypeComponent = (props: ValueTypeComponentProps) => {
value={props.value.type} value={props.value.type}
types={props.types} types={props.types}
onChange={ onChange={
(contact: object, key: number, payload: any) => props.onChange(props.name, payload, props.value.value) (event: React.ChangeEvent<HTMLSelectElement>) => (
props.onChange(props.name, event.target.value, props.value.value)
)
} }
/> />
</React.Fragment> </React.Fragment>

Loading…
Cancel
Save