Commit 62aa15f7 by Dominik Prokop Committed by GitHub

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

parent e36a6ac4
...@@ -39,9 +39,10 @@ export const NumberValueEditor: React.FC<FieldConfigEditorProps<number, NumberFi ...@@ -39,9 +39,10 @@ export const NumberValueEditor: React.FC<FieldConfigEditorProps<number, NumberFi
[onChange] [onChange]
); );
const defaultValue = value === undefined || value === null || isNaN(value) ? '' : value.toString();
return ( return (
<Input <Input
defaultValue={isNaN(value) ? '' : value.toString()} defaultValue={defaultValue}
min={settings?.min} min={settings?.min}
max={settings?.max} max={settings?.max}
type="number" type="number"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment