Skip to content

Commit

Permalink
fix: fieldErrors keys autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed May 27, 2024
1 parent 37a6d99 commit a82713e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/atomWithFormControls.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WritableAtom, atom } from 'jotai/vanilla';
import { atom, WritableAtom } from 'jotai/vanilla';
import type {
ExtractTypeOfValidatorValue,
Validator,
Expand All @@ -19,7 +19,7 @@ export type ActionableNext = {
export type FormControls<Keys extends string, Vals> = {
isValid: boolean;
fieldErrors: {
[k: string]: any;
[k in Keys]: Error;
};
touched: Record<Keys, boolean>;
focused: Record<Keys, boolean>;
Expand Down

0 comments on commit a82713e

Please sign in to comment.