Question: Is changing the `inputValue` on the `ArrowUp` and `ArrowDown` event possible?
See original GitHub issueI am trying to make a call to selectedHighlightedItem
every time the user changes the highlighted menu item. When I press enter, everything works, but the isOpen
changes to false
and I don’t want the user to press Enter for this anyway. Is there a way to make it work? I would appreciate any help!
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Question: Is changing the inputValue on the ArrowUp ... - GitHub
Question: Is changing the inputValue on the ArrowUp and ArrowDown event ... relate to it and I guess it's possible to modify this...
Read more >Prevent default behavior in text input while pressing arrow up
To preserve cursor position, backup input.selectionStart before changing value. The problem is that WebKit reacts to keydown and Opera ...
Read more >KeyboardEvent.key - Web APIs | MDN
When the shift key is pressed, a keydown event is first fired, and the key property value is set to the string Shift...
Read more >[How2Tips] How to restrict allowed characters inside a text ...
When the event is triggered, input value is already updated with incoming character. All we have to do then is to replace unwanted...
Read more >Focusing: focus/blur - The Modern JavaScript Tutorial
The focus event is called on focusing, and blur – when the element loses the focus. Let's use them for validation of an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @TheoVitkovskiy!
Thanks for the issue! It’ll be much easier for folks here to help you if you provide an example (which is why we have an issue template, please follow that next time). You can start here: http://kcd.im/ds-example
No worries @TheoVitkovskiy 😃 We’re happy to help where we can. This is definitely possible. I think the easiest solution is to use a
stateReducer
like this: https://codesandbox.io/s/v6yn8j0l03I think I’ll go ahead and close this issue as it’s not actionable, but feel free to ask any clarifying questions. 😃