omridevk / ng-keyboard-shortcuts

Dead Simple Keyboard Shortcuts Management for Angular

Home Page:https://ng-keyboard-shortcuts.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not display help causes one event too many after disabled

jdessaint opened this issue · comments

Hello! I started to use this package in order to implement special navigation in my app. In this app, I have a custom table with a selected object by index : ArrowDown to increase index, ArrowUp to decrease. When an event occurs and disables the shortcuts, these work once too more.
Here an example of the problem : https://codesandbox.io/s/ng-keyboard-shortcuts-issue-with-problem-ey691

To bypass this problem, we just need to add the help component : https://codesandbox.io/s/ng-keyboard-shortcuts-issue-81hgk. (the only changed file is app.component.html).

We shouldn't be forced to display the help component I think. Do you have any idea about that ?

PS : Thanks for your very useful package!

commented

fixed.