Fix DataEntry errors
This commit is contained in:
parent
e1e1bc7aa5
commit
0e1aca0e9e
@ -37,9 +37,12 @@ const DataEntry: React.FunctionComponent<DataEntryProps> = (props) => {
|
||||
disabled={props.mode === 'view' || props.disabled}
|
||||
placeholder={props.placeholder}
|
||||
onChange={e =>
|
||||
e.target.value === '' ?
|
||||
null :
|
||||
props.onChange(props.slug, e.target.value)
|
||||
props.onChange(
|
||||
props.slug,
|
||||
e.target.value === '' ?
|
||||
null :
|
||||
e.target.value
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Fragment>
|
||||
|
@ -42,7 +42,12 @@ const TypeView = (props) => {
|
||||
/>
|
||||
<DataEntry
|
||||
title="Original building use"
|
||||
slug=""
|
||||
tooltip="What was the building originally used for when it was built? I.e. If it was Victorian warehouse which is now an office this would be warehouse"
|
||||
value={undefined}
|
||||
copy={props.copy}
|
||||
mode={props.mode}
|
||||
onChange={props.onUpdate}
|
||||
disabled={true}
|
||||
/>
|
||||
</Fragment>
|
||||
|
Loading…
Reference in New Issue
Block a user