Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the avatar get uploaded without submitting the form? Is that why we don't check for it here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is there not form.isDirty or something similar in clerk-js?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We upload the logo, after the org is created (after the submission)

No i don't think we support isDirty out of the box.


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