Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal form change proposal #416

Merged
merged 2 commits into from
Sep 15, 2023
Merged

Conversation

victorcarvalhosp
Copy link
Contributor

@victorcarvalhosp victorcarvalhosp commented Sep 7, 2023

Right now it's not possible to add a form inside a Modal as it throws this error:
Warning: validateDOMNesting(...): <form> cannot appear as a descendant of <form>.

Clicking on any button inside the modal closes it as well, which is not always intended.

This PR proposes to change this behavior, if a user want to close the modal he can always use:

<form method="dialog">
           <Button>Close</Button>
</form>

or
<Button onClick={toggleModal}>Close me</Button>
inside the modal.

This is a proposal change for this opened issue: #415

@netlify
Copy link

netlify bot commented Sep 7, 2023

👷 Deploy Preview for react-daisyui processing.

Name Link
🔨 Latest commit b3a3c68
🔍 Latest deploy log https://app.netlify.com/sites/react-daisyui/deploys/64f9144632f5630008649d6c

@netlify
Copy link

netlify bot commented Sep 7, 2023

Deploy Preview for react-daisyui ready!

Name Link
🔨 Latest commit b3a3c68
🔍 Latest deploy log https://app.netlify.com/sites/react-daisyui/deploys/64f9144632f5630008649d6c
😎 Deploy Preview https://deploy-preview-416--react-daisyui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 7, 2023

👷 Deploy Preview for react-daisyui processing.

Name Link
🔨 Latest commit b3a3c68
🔍 Latest deploy log https://app.netlify.com/sites/react-daisyui/deploys/64f9144632f5630008649d6c

@yoshi6jp
Copy link
Contributor

yoshi6jp commented Sep 8, 2023

Related to this commit
saadeghi/daisyui@314761e

LGTM 👍

@benjitrosch benjitrosch merged commit 3c21419 into daisyui:main Sep 15, 2023
4 checks passed
benjitrosch added a commit that referenced this pull request Sep 15, 2023
benjitrosch pushed a commit that referenced this pull request Sep 15, 2023
* Removes form from modal allowing users to create forms inside modal

* Removes form from modal allowing users to create forms inside modal
This was referenced Sep 15, 2023
@victorcarvalhosp victorcarvalhosp deleted the fix/modal-form branch September 15, 2023 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants