Skip to content

Commit 1f4e90a

Browse files
committed
chore: use DeepKeysOfType for clearFieldValues
1 parent e94f8c5 commit 1f4e90a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/form-core/src/FormApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,7 @@ export class FormApi<
21282128
/**
21292129
* Clear all values within an array field.
21302130
*/
2131-
clearFieldValues = <TField extends DeepKeys<TFormData>>(
2131+
clearFieldValues = <TField extends DeepKeysOfType<TFormData, any[]>>(
21322132
field: TField,
21332133
opts?: UpdateMetaOptions,
21342134
) => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3273,7 +3273,7 @@ describe('form api', () => {
32733273
{
32743274
firstName: 'Darcy',
32753275
},
3276-
] as const
3276+
]
32773277

32783278
const form = new FormApi({
32793279
defaultValues: {

0 commit comments

Comments
 (0)