Skip to content

Commit ba684d4

Browse files
authored
fix wording of onBlur debounce method
1 parent abacf0e commit ba684d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/form-core/src/FieldApi.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export interface FieldListeners<
351351
onChange?: FieldListenerFn<TParentData, TName, TData>
352352
onChangeDebounceMs?: number
353353
onBlur?: FieldListenerFn<TParentData, TName, TData>
354-
onBlurAsyncDebounceMs?: number
354+
onBlurDebounceMs?: number
355355
onMount?: FieldListenerFn<TParentData, TName, TData>
356356
onSubmit?: FieldListenerFn<TParentData, TName, TData>
357357
}
@@ -1653,7 +1653,7 @@ export class FieldApi<
16531653
* Handles the blur event with debounce support.
16541654
*/
16551655
handleBlur = () => {
1656-
const debounceMs = this.options.listeners?.onBlurAsyncDebounceMs || 0
1656+
const debounceMs = this.options.listeners?.onBlurDebounceMs || 0
16571657

16581658
if (this.debounceTimeouts.onBlur) {
16591659
clearTimeout(this.debounceTimeouts.onBlur)

packages/form-core/tests/FieldApi.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ describe('field api', () => {
19411941
name: 'name',
19421942
listeners: {
19431943
onBlur: onBlurMock,
1944-
onBlurAsyncDebounceMs: 300,
1944+
onBlurDebounceMs: 300,
19451945
},
19461946
})
19471947

0 commit comments

Comments
 (0)