Skip to content

Commit

Permalink
chore(clerk-js): Keep CreateOrganizationForm disabled if avatar has b…
Browse files Browse the repository at this point in the history
…een uploaded (#1910)
  • Loading branch information
nikospapcom authored Oct 18, 2023
1 parent 3bf6410 commit 89932e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hot-shoes-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Keep `CreateOrganizationForm` disabled in case of an uploaded avatar and organization name is empty.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const CreateOrganizationForm = (props: CreateOrganizationFormProps) => {
});

const dataChanged = !!nameField.value;
const canSubmit = dataChanged || !!file;
const canSubmit = dataChanged;

const onSubmit = async (e: React.FormEvent) => {
e.preventDefault();
Expand Down

0 comments on commit 89932e1

Please sign in to comment.