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

feature request: prevent open event via listener or callback #13

Open
viglucci opened this issue Jan 31, 2022 · 3 comments
Open

feature request: prevent open event via listener or callback #13

viglucci opened this issue Jan 31, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@viglucci
Copy link

Is there currently a way to prevent the menu from opening when the hotkey (ctrl + k) is invoked?

I have a scenario where the component which mounts the ninja-key element has an initial loading state, and I would like to be able to prevent the command menu from opening while in the loading state.

Thanks

@viglucci viglucci changed the title feature request: prevent open in callback feature request: prevent open event via listener or callback Jan 31, 2022
@ssleptsov
Copy link
Owner

Right now no.
But that sounds as a good feature, I will add "enabled/disabled" property
Thanks!

@ssleptsov ssleptsov added the enhancement New feature or request label Feb 1, 2022
@viglucci
Copy link
Author

viglucci commented Feb 1, 2022

Thanks!

One quick question: will the enabled/disabled property also prevent the children hotkeys from invoking as well? I think if enabled: false is set, then ctrl + h (home) should also be disabled, but just wanted to clarify what your thoughts were.

Thanks again

@ssleptsov
Copy link
Owner

Yeah, sure. It will disable/enable all hotkeys too based on that property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants