diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-09-17 09:01:04 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-09-17 09:01:04 +0700 |
| commit | aaf907c834343970e1d30b3ef49c13ed5f9d34ed (patch) | |
| tree | e22a80c3b9bfc2835ad78c13fc51fcafbc6598a0 /src-migrate/modules/register/components/FormBisnis.tsx | |
| parent | 499954a8be814850103eece2dbd0306d6246989d (diff) | |
<iman> add focus error when button submit click
Diffstat (limited to 'src-migrate/modules/register/components/FormBisnis.tsx')
| -rw-r--r-- | src-migrate/modules/register/components/FormBisnis.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src-migrate/modules/register/components/FormBisnis.tsx b/src-migrate/modules/register/components/FormBisnis.tsx index dd9cd72f..2ac998c9 100644 --- a/src-migrate/modules/register/components/FormBisnis.tsx +++ b/src-migrate/modules/register/components/FormBisnis.tsx @@ -26,6 +26,7 @@ interface FormProps { required: boolean; isPKP: boolean; chekValid: boolean; + buttonSubmitClick: boolean; } interface industry_id { @@ -39,7 +40,13 @@ interface companyType { label: string; } -const form: React.FC<FormProps> = ({ type, required, isPKP, chekValid }) => { +const form: React.FC<FormProps> = ({ + type, + required, + isPKP, + chekValid, + buttonSubmitClick, +}) => { const { form, errors, updateForm, validate } = useRegisterStore(); const { control, watch, setValue } = useForm(); const [selectedCategory, setSelectedCategory] = useState<string>(''); @@ -278,7 +285,7 @@ const form: React.FC<FormProps> = ({ type, required, isPKP, chekValid }) => { } }; loadIndustries(); - }, [chekValid, form, errors]); + }, [buttonSubmitClick]); const handleSubmit = async (e: ChangeEvent<HTMLFormElement>) => { e.preventDefault(); |
