Skip to content

Commit e1a4b23

Browse files
chore: useSetFormValues TS Support (#4475)
1 parent a023c70 commit e1a4b23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vee-validate/src/useSetFormValues.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { injectWithSelf, warn } from './utils';
44
/**
55
* Sets multiple fields values
66
*/
7-
export function useSetFormValues() {
7+
export function useSetFormValues<TValues extends Record<string, unknown> = Record<string, unknown>>() {
88
const form = injectWithSelf(FormContextKey);
99

10-
function setFormValues(fields: Record<string, unknown>, shouldValidate = true) {
10+
function setFormValues(fields: TValues, shouldValidate = true) {
1111
if (form) {
1212
form.setValues(fields, shouldValidate);
1313
return;

0 commit comments

Comments
 (0)