Adding an option to the Dialog component that prevents it from closing when the escape key is pressed #2353
myeongjae-kim
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background
I attempted to insert a spreadsheet onto the Dialog component of headlessui. Upon pressing the escape key during cell editing, I anticipated the cell editing to be canceled, but the Dialog component was closed instead. Unfortunately, I could not locate any available option to prevent the Dialog from closing when the escape key is pressed.
Feature request
To address this issue, I added a escClosable boolean property to the Dialog component, which effectively resolved the problem. I would appreciate your feedback on this new feature. I have already implemented it and intend to submit a pull request to contribute.
poc.mov
Beta Was this translation helpful? Give feedback.
All reactions