GenericInput: Allow number inputs to be cleared

This commit is contained in:
Gustav Hansen 2022-03-16 14:48:10 +01:00
parent 960520c086
commit 19bd74f292

View File

@ -216,12 +216,12 @@ const GenericInput = ({
hint={hint}
name={name}
onValueChange={value => {
onChange({ target: { name, value, type } });
onChange({ target: { name, value: value ?? null, type } });
}}
placeholder={formattedPlaceholder}
required={required}
step={step}
value={value ?? undefined}
value={value ?? null}
/>
);
}