Using the command state outside of Command #185
Unanswered
Adam-Collier
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The use case here is I have something similar to this but for emails and list consisting of current users in a team:
code: https://github.com/mxkaske/mxkaske.dev/blob/main/components/craft/fancy-multi-select.tsx
demo: https://craft.mxkaske.dev/post/fancy-multi-select
What I would like to be able to do is somehow use the
Commandstate in thehandleKeyDownto check if there is currently a filter count and conditionally run a function onenter.Creating a wrapper component so I can use the
useCommandStatehook doesn't work here because the handleKeyDown is on theCommanditselfThis currently doesn't seem to be possible unless I am missing something here 🤷♂️
Beta Was this translation helpful? Give feedback.
All reactions