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
-
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
Command
state in thehandleKeyDown
to check if there is currently a filter count and conditionally run a function onenter
.Creating a wrapper component so I can use the
useCommandState
hook doesn't work here because the handleKeyDown is on theCommand
itselfThis currently doesn't seem to be possible unless I am missing something here 🤷♂️
Beta Was this translation helpful? Give feedback.
All reactions