mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 08:23:12 +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);
|
request = props.setProp(fieldName, prop, value);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
request = props.setField(field, value);
|
request = props.setField(field, value === null ? "" : String(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default function InstanceConfigTree(props) {
|
|||||||
await libLink.messages.setInstanceConfigField.send(control, {
|
await libLink.messages.setInstanceConfigField.send(control, {
|
||||||
instance_id: props.id,
|
instance_id: props.id,
|
||||||
field,
|
field,
|
||||||
value: String(value),
|
value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user