improve (edge case): code maintenance

This commit is contained in:
Mickael KERJEAN
2019-02-18 18:33:46 +11:00
parent 39441d4a5e
commit 7f820b8cd4
3 changed files with 3 additions and 13 deletions

View File

@ -156,7 +156,7 @@ const FormElement = (props) => {
value = value === "" ? null : parseInt(value);
props.onChange(value);
};
$input = ( <Input onChange={(e) => onNumberChange(e.target.value)} {...id} name={struct.label} type="number" value={struct.value || ""} placeholder={struct.placeholder} /> );
$input = ( <Input onChange={(e) => onNumberChange(e.target.value)} {...id} name={struct.label} type="number" value={struct.value === null ? "" : struct.value} placeholder={struct.placeholder} /> );
break;
case "password":
const onPasswordChange = (value) => {