-
Notifications
You must be signed in to change notification settings - Fork 521
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
Fix close modal with escape keydown and cleanup import react #218
Conversation
add fix for label input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @fouteox,
Thanks for the PR. I've confirmed this fixes the close on escape and label behaviour, although I've left a comment regarding the latter.
As for the React
import, I'm not super familiar with React and I appreciate any improvements that can be made.
I've tried your PR though, and I get the following warning during the SSR build:
You can see it in CI here as well.
And when I log in to the application, nothing renders on the dashboard route and I get this error in the browser console:
I would like to get the other changes merged so it might be better to move the import changes to a separate PR if you'd still like to pursue it.
Thanks again!
Strange, I tried to compile on my side and I don't have this error, I sent a new commit by deleting the last import remaining in ssr.jsx, can you try again please? |
@jessarcher please mark as ready for review once you take a look again |
I finally found the problem with the React import, in the Dropdown file, so I fixed it. I also refactored the Modal component using the power of headlessui which natively creates a portal and supports the keyboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @fouteox! This looks and works great!
You've improved the functionality and reduced the code 🎉
…#218) * React formatting * Coherence type for input * Fix close modal with escape key and cleanup import react * fix label * add id for label and try delete import react in ssr.jsx * fix React import and refactor Modal with native Portal in headlessui * fix space * tiny fix
Hi, I fixed modal closing by adding "show" in useEffect dependency on DeleteUserForm page.
Then I cleaned up React calls that are no longer needed.