mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-08-27 12:24:00 +00:00
Pull request 2536: AGDNS-3462 Fix submit button disabled state for dns upstream settings
Squashed commit of the following:
commit 222e41ad3e397f7e97e6ad4ca3929b97ed164e59
Author: Arseny Lisin <a.lisin@adguard.com>
Date: Fri Nov 28 11:14:17 2025 +0300
Fix
commit 512aa2e69f3e21ebb62fc19d8d6b98b5c70d1ce9
Author: Arseny Lisin <a.lisin@adguard.com>
Date: Thu Nov 27 15:41:41 2025 +0300
Review fix
commit a58bafe281de1b716e28aa1130991fa16754211d
Author: Arseny Lisin <a.lisin@adguard.com>
Date: Thu Nov 27 15:28:24 2025 +0300
Fix submit button disabled state for dns upstream settings
This commit is contained in:
parent
db96dc5003
commit
59e8c8385d
3 changed files with 6 additions and 6 deletions
|
|
@ -70,7 +70,7 @@ const Form = ({ initialValues, onSubmit, processingSet }: FormProps) => {
|
|||
control,
|
||||
handleSubmit,
|
||||
watch,
|
||||
formState: { isSubmitting, isDirty },
|
||||
formState: { isSubmitting },
|
||||
} = useForm<FormData>({
|
||||
mode: 'onBlur',
|
||||
defaultValues: {
|
||||
|
|
@ -133,7 +133,7 @@ const Form = ({ initialValues, onSubmit, processingSet }: FormProps) => {
|
|||
type="submit"
|
||||
data-testid="access_save"
|
||||
className="btn btn-success btn-standard"
|
||||
disabled={isSubmitting || !isDirty || processingSet}>
|
||||
disabled={isSubmitting || processingSet}>
|
||||
{t('save_config')}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ const Form = ({ processing, initialValues, onSubmit }: Props) => {
|
|||
handleSubmit,
|
||||
watch,
|
||||
control,
|
||||
formState: { isSubmitting, isDirty },
|
||||
formState: { isSubmitting },
|
||||
} = useForm<FormData>({
|
||||
mode: 'onBlur',
|
||||
defaultValues: initialValues,
|
||||
|
|
@ -383,7 +383,7 @@ const Form = ({ processing, initialValues, onSubmit }: Props) => {
|
|||
type="submit"
|
||||
data-testid="dns_config_save"
|
||||
className="btn btn-success btn-standard btn-large"
|
||||
disabled={isSubmitting || !isDirty || processing}>
|
||||
disabled={isSubmitting || processing}>
|
||||
{t('save_btn')}
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const Form = ({ initialValues, onSubmit }: FormProps) => {
|
|||
control,
|
||||
handleSubmit,
|
||||
watch,
|
||||
formState: { isSubmitting, isDirty },
|
||||
formState: { isSubmitting },
|
||||
} = useForm<FormData>({
|
||||
mode: 'onBlur',
|
||||
defaultValues: {
|
||||
|
|
@ -345,7 +345,7 @@ const Form = ({ initialValues, onSubmit }: FormProps) => {
|
|||
type="submit"
|
||||
data-testid="dns_upstream_save"
|
||||
className="btn btn-success btn-standard"
|
||||
disabled={isSubmitting || !isDirty || processingSetConfig || processingTestUpstream}>
|
||||
disabled={isSubmitting || processingSetConfig || processingTestUpstream}>
|
||||
{t('apply_btn')}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue