Skip to content

Commit

Permalink
chore(clerk-js): Eliminate error for invalid props
Browse files Browse the repository at this point in the history
  • Loading branch information
panteliselef committed Aug 3, 2023
1 parent 86de584 commit 649ba46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .changeset/twelve-weeks-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ export const InviteMembersForm = (props: InviteMembersFormProps) => {
setSuccessful,
successfulText,
warningText,
validatePassword,
setHasPassedComplexity,
hasPassedComplexity,
/* eslint-enable @typescript-eslint/no-unused-vars */
...restEmailAddressProps
},
Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/src/ui/utils/useFormControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const useFormControl = <Id extends string>(
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { defaultChecked, validatePassword: validatePasswordProp, ...restOpts } = opts;
const { defaultChecked, validatePassword: validatePasswordProp, buildErrorMessage, ...restOpts } = opts;

const props = {
id,
Expand All @@ -148,7 +148,7 @@ export const useFormControl = <Id extends string>(
...restOpts,
};

return { props, ...props, setError, setValue, setChecked };
return { props, ...props, buildErrorMessage, setError, setValue, setChecked };
};

type FormControlStateLike = Pick<FormControlState, 'id' | 'value'>;
Expand Down

0 comments on commit 649ba46

Please sign in to comment.