Skip to content

Commit

Permalink
fix: export & name atom
Browse files Browse the repository at this point in the history
thank you typescript
  • Loading branch information
MiroslavPetrik committed Mar 4, 2024
1 parent 6e89d1d commit 247785b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/atoms/list-atom/listItemForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export function listItemForm<Fields extends FormFields>({
);

// @ts-expect-error field is PrimitiveAtom
set(field, { name: scopedNameAtom, originalFieldNameAtom, ...atoms });
set(field, { ...atoms, name: scopedNameAtom, originalFieldNameAtom });
});

return () => {
Expand All @@ -168,10 +168,10 @@ export function listItemForm<Fields extends FormFields>({

// @ts-expect-error field is PrimitiveAtom
set(field, {
...atoms,
// drop the scopedNameAtom, as to not make it original on next mount
name: originalFieldNameAtom,
originalFieldNameAtom: undefined,
...atoms,
});
});
};
Expand Down
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./list";
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./atoms";
export * from "./components";
export * from "./fields";
export * from "./hooks";

0 comments on commit 247785b

Please sign in to comment.