mirror of
https://github.com/LukeHagar/form.git
synced 2025-12-10 04:19:54 +00:00
fix(form-core): remove 500ms fallback for asyncDebounceMs
* test(form-core): add async validation tests * chore(form-core): remove old asyncDebounceMs api * Revert "chore(form-core): remove old asyncDebounceMs api" This reverts commit cd7dbc11ec3acdc529d77df10dc1f990f8a7bfcf. * fix(form-core): make sure to fallback to asyncDebounceMs * chore(form-core): remove 500ms fallback --------- Co-authored-by: João Pedro Magalhães <joaopsilvamagalhaes@gmail.com>
This commit is contained in:
committed by
GitHub
parent
de22b6c38a
commit
3b7f6c16ba
@@ -165,8 +165,6 @@ export class FieldApi<TData, TFormData> {
|
||||
update = (opts: FieldApiOptions<typeof this._tdata, TFormData>) => {
|
||||
this.options = {
|
||||
asyncDebounceMs: this.form.options.asyncDebounceMs ?? 0,
|
||||
onChangeAsyncDebounceMs: this.form.options.onChangeAsyncDebounceMs ?? 0,
|
||||
onBlurAsyncDebounceMs: this.form.options.onBlurAsyncDebounceMs ?? 0,
|
||||
...opts,
|
||||
} as never
|
||||
|
||||
@@ -312,7 +310,7 @@ export class FieldApi<TData, TFormData> {
|
||||
? onChangeAsyncDebounceMs
|
||||
: onBlurAsyncDebounceMs) ??
|
||||
asyncDebounceMs ??
|
||||
500
|
||||
0
|
||||
|
||||
if (this.state.meta.isValidating !== true)
|
||||
this.setMeta((prev) => ({ ...prev, isValidating: true }))
|
||||
|
||||
Reference in New Issue
Block a user