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

Disabling hotkey action trigger on logical expression? #1

Open
viclarsson opened this issue May 5, 2018 · 0 comments
Open

Disabling hotkey action trigger on logical expression? #1

viclarsson opened this issue May 5, 2018 · 0 comments
Labels
question Further information is requested

Comments

@viclarsson
Copy link
Owner

Example: <Hotkey keyCode={13} handler={() => ...} disable={isDisabled} /> would not call the handler when isDisable === true.

But, is this necessary? The workaround now is to simply not render the component for that state, which is very simple:
!isDisable && <Hotkey keyCode={13} handler={() => ...} />

@viclarsson viclarsson changed the title Disabling hotkey action trigger on logical expression Disabling hotkey action trigger on logical expression? May 6, 2018
@viclarsson viclarsson added the question Further information is requested label May 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant