From 1043d0e7a92ad6f5354032175a865a2c68b0ae8a Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Wed, 2 Oct 2019 12:28:19 +0100 Subject: [PATCH 1/2] Fix onChange handler for select data entry E.g. in Age > Source of Information, allows selecting data. --- app/src/frontend/building/data-components/select-data-entry.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-components/select-data-entry.tsx b/app/src/frontend/building/data-components/select-data-entry.tsx index 2e70f81b..d09cca17 100644 --- a/app/src/frontend/building/data-components/select-data-entry.tsx +++ b/app/src/frontend/building/data-components/select-data-entry.tsx @@ -17,7 +17,7 @@ const SelectDataEntry: React.FunctionComponent = (props) => { // TODO: remo id={props.slug} name={props.slug} value={props.value || ''} disabled={props.mode === 'view' || props.disabled} - onChange={props.handleChange}> + onChange={props.onChange}> { props.options.map(option => ( From 34fb8a62c718557b52c0d33c96682f3a27791bfb Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Wed, 2 Oct 2019 12:28:35 +0100 Subject: [PATCH 2/2] Fix propTypes name for onChange in MultiDataEntry --- app/src/frontend/building/data-components/multi-data-entry.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-components/multi-data-entry.tsx b/app/src/frontend/building/data-components/multi-data-entry.tsx index c932bd7a..11e50452 100644 --- a/app/src/frontend/building/data-components/multi-data-entry.tsx +++ b/app/src/frontend/building/data-components/multi-data-entry.tsx @@ -13,7 +13,7 @@ class MultiDataEntry extends Component { // TODO: add proper types value: PropTypes.arrayOf(PropTypes.string), placeholder: PropTypes.string, disabled: PropTypes.bool, - handleChange: PropTypes.func, + onChange: PropTypes.func, copy: PropTypes.bool, toggleCopyAttribute: PropTypes.func, copying: PropTypes.bool