From 4d386f5a0a1c8458b160e87c482a49ac4e63bb9c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 13 Nov 2018 10:26:58 +0000 Subject: [PATCH] Contact edit: fix changing subfield types. --- src/components/ContactEdit.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ContactEdit.tsx b/src/components/ContactEdit.tsx index 72ad82a..6512827 100644 --- a/src/components/ContactEdit.tsx +++ b/src/components/ContactEdit.tsx @@ -87,7 +87,6 @@ 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) => ( + props.onChange(props.name, event.target.value, props.value.value) + ) } />