Contact edit: fix changing subfield types.

master
Tom Hacohen 2018-11-13 10:26:58 +00:00
parent 31bb36187a
commit 4d386f5a0a
1 changed files with 3 additions and 2 deletions

View File

@ -87,7 +87,6 @@ const ValueTypeComponent = (props: ValueTypeComponentProps) => {
<React.Fragment>
<TextField
type={props.type}
name={props.name}
placeholder={props.placeholder}
style={props.style}
value={props.value.value}
@ -103,7 +102,9 @@ const ValueTypeComponent = (props: ValueTypeComponentProps) => {
value={props.value.type}
types={props.types}
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>