diff --git a/src/pages/master/brandDevice/component/ErrorCodeForm.jsx b/src/pages/master/brandDevice/component/ErrorCodeForm.jsx index 666e3b1..2030332 100644 --- a/src/pages/master/brandDevice/component/ErrorCodeForm.jsx +++ b/src/pages/master/brandDevice/component/ErrorCodeForm.jsx @@ -15,8 +15,8 @@ const ErrorCodeForm = ({ onErrorCodeIconRemove, isEdit = false, }) => { - const [statusValue, setStatusValue] = useState(true); const [currentIcon, setCurrentIcon] = useState(null); + const statusWatch = Form.useWatch('status', errorCodeForm) ?? true; useEffect(() => { if (errorCodeIcon && typeof errorCodeIcon === 'object' && Object.keys(errorCodeIcon).length > 0) { @@ -207,14 +207,13 @@ const ErrorCodeForm = ({ valuePropName="checked" >