You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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={() => ...} />
The text was updated successfully, but these errors were encountered:
viclarsson
changed the title
Disabling hotkey action trigger on logical expression
Disabling hotkey action trigger on logical expression?
May 6, 2018
Example:
<Hotkey keyCode={13} handler={() => ...} disable={isDisabled} />
would not call the handler whenisDisable === 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={() => ...} />
The text was updated successfully, but these errors were encountered: