Skip to content

Commit

Permalink
types(use-list-field): allow listAtom
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroslavPetrik committed Feb 16, 2024
1 parent 827c729 commit d780fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/use-list-field/useListField.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { UseFieldOptions } from "form-atoms";
import { useAtomValue } from "jotai";

import { ListAtomItems, ListAtomValue } from "../../atoms/list-atom";
import { ListAtom, ListAtomItems, ListAtomValue } from "../../atoms/list-atom";
import { ListField } from "../../fields";
import { useListActions } from "../use-list-actions";
import { useListFieldInitialValue } from "../use-list-field-initial-value";
Expand All @@ -10,7 +10,7 @@ export const useListField = <
Fields extends ListAtomItems,
Value extends ListAtomValue<Fields>,
>(
list: ListField<Fields, Value>,
list: ListField<Fields, Value> | ListAtom<Fields, Value>,
options?: UseFieldOptions<Value[]>,
) => {
useListFieldInitialValue(list, options?.initialValue, options);
Expand Down

0 comments on commit d780fb2

Please sign in to comment.