From 8e2c78bbf69e1201c20d6cb4b76cdb7dc796375a Mon Sep 17 00:00:00 2001 From: PBK-B Date: Sat, 2 Nov 2024 22:49:02 +0800 Subject: [PATCH] fix: processing server setting form can't submit the problem --- ui/App/views/ServerSettings.jsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ui/App/views/ServerSettings.jsx b/ui/App/views/ServerSettings.jsx index 754feef8..4eb18a87 100644 --- a/ui/App/views/ServerSettings.jsx +++ b/ui/App/views/ServerSettings.jsx @@ -13,7 +13,7 @@ const ServerSettings = () => { const [settings, setSettings] = useState(); const [numberInputs, setNumberInputs] = useState([]); - const {register, handleSubmit, formState: {errors}, control} = useForm(); + const {register: registerForm, handleSubmit, formState: {errors}, control} = useForm(); const fetchSettings = async () => { const res = await settingsResource.server.list(); @@ -49,6 +49,8 @@ const ServerSettings = () => { return null; } + const register = registerForm(name) + switch (typeof value) { case "undefined": break; @@ -103,9 +105,14 @@ const ServerSettings = () => { <>