PanelEdit: Field Config options Fix numeric option bug (#24397)

This commit is contained in:
Dominik Prokop 2020-05-07 21:40:23 +02:00 committed by GitHub
parent e36a6ac476
commit 62aa15f760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,9 +39,10 @@ export const NumberValueEditor: React.FC<FieldConfigEditorProps<number, NumberFi
[onChange]
);
const defaultValue = value === undefined || value === null || isNaN(value) ? '' : value.toString();
return (
<Input
defaultValue={isNaN(value) ? '' : value.toString()}
defaultValue={defaultValue}
min={settings?.min}
max={settings?.max}
type="number"