Replies: 1 comment 4 replies
-
Hey @aseroff thanks for the question. I think your best bet will be to use a stimulus controller to auto-submit the form based on the events emitted by the combobox. Here's an example: #137 (comment) Let me know if that doesn't work for you. Closing for now. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It looks like deep in navigate Enter is bound to closing and blurring the combobox. Based on this I figured I could add my own binding to enter and it would be prepended to the list of actions on the input, but it's not working.
= form.combobox :search, library_textbooks_path, name_when_new: 'term', render_in: { partial: 'library/textbooks/search_result' }, dialog_label: 'Textbook Search', placeholder: 'Search the Library', data: { action: 'keydown.enter->form#submit' }
Am I doing something wrong? If so, how would I accomplish my enter to submit use case?
Beta Was this translation helpful? Give feedback.
All reactions