Skip to content

Commit 15958cb

Browse files
committed
Updated types
1 parent d4ec70d commit 15958cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export function createForm<Data>({ initialValues, validationSchema, css: cssConf
258258
});
259259

260260
const handleChange = (event: Event) => {
261-
const target = event?.target as HTMLInputElement;
261+
const target = event?.target as HTMLElement & { name: string };
262262
target.name && updateFieldTouched(target.name, state);
263263
isTouched.set(true);
264264
}
@@ -267,7 +267,7 @@ export function createForm<Data>({ initialValues, validationSchema, css: cssConf
267267
isTouched.set(state);
268268
}
269269

270-
const formControl = (node: HTMLInputElement, options: any = {}) => {
270+
const formControl = (node: HTMLElement & { name: string }, options: any = {}) => {
271271
const changeListener = (event: Event) => {
272272
if (validateOnChange) {
273273
handleChange(event);

0 commit comments

Comments
 (0)