Fix unable to clear number fields in web UI (#402)

Fix setting a nullable numeric field to blank in the web UI return error
that the value cannot be a string due to the field returning null and
this being converted to the string "null".
This commit is contained in:
Hornwitser authored and GitHub committed 2021-08-03 16:09:17 +02:00
1 parent f2c9cd0c62
commit 0576308187
2 files changed
+2 -2

No files matched your search

@@ -190,7 +190,7 @@ export default function BaseConfigTree(props) {
request = props.setProp(fieldName, prop, value);
} else {
request = props.setField(field, value);
request = props.setField(field, value === null ? "" : String(value));
}
try {
@@ -22,7 +22,7 @@ export default function InstanceConfigTree(props) {
await libLink.messages.setInstanceConfigField.send(control, {
instance_id: props.id,
field,
value: String(value),
value,
});
}