Skip to content

Add a prop to configure whether <kbd>esc</kbd> should close the panel#106

Open
cyrilfretlink wants to merge 2 commits intoreact-component:masterfrom
fretlink:master
Open

Add a prop to configure whether <kbd>esc</kbd> should close the panel#106
cyrilfretlink wants to merge 2 commits intoreact-component:masterfrom
fretlink:master

Conversation

@cyrilfretlink
Copy link

This change is useful when you have multiple components listening to esc and you don’t want to close them all at the same time (e.g. if you render this component inside a modal or a side panel).

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.319% when pulling 273181d on fretlink:master into 77862ae on react-component:master.

@nasy
Copy link

nasy commented Jun 27, 2018

I think this would be useful, I am facing a problem is that when I click on the selector it closes both the selector modal and the other modal I have open.

Until this gets merged doo you know any workaround for this @cyrilfretlink ?

@cyrilfretlink
Copy link
Author

It may be possible to toggle some state in onClose and to decide to close your other components or not based on this state but merging this fix would make it much easier.

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