mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 07:24:52 +09:00
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:
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user