[Combobox] Keypress control when Options not open. #1198
FranciscoMessina
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
@FranciscoMessina I think your issue is actually that modifiers aren't supported on the
Additionally, Instead you should use |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, this is my first time writing here, so I apologize in advance in case I am doing something wrong. I was looking for a way to make a autocomplete with typeahead in an textarea (Twitter mentions style), and came across the Combobox component. I am building a input where you can search for elements (like products or quick answers) and quickly insert the url to the product or the quick answer in it. I managed to use the Combobox to do it, but I had a onKeypress event listener so when the user pressed CRTL + Enter the input was submitted. However the combobox has a event listener that prevents default and stops propagation on the Enter key, when you have options showing this is completely fine, but if there are no option shown and the Options is closed, I think it would be nice to be hable to use all the Keys. The way I thought to workaround this is adding a isOpen prop and if it is not open then ignore the default event listener and continue to the custom one, in this case crtl + enter. I hope what I wrote is understandable.
I leave some images of the component I am building, not sure if they help or not.



Beta Was this translation helpful? Give feedback.
All reactions