question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Is changing the `inputValue` on the `ArrowUp` and `ArrowDown` event possible?

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kentcdoddscommented, Feb 26, 2018

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

0reactions
kentcdoddscommented, Feb 27, 2018

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/v6yn8j0l03

I think I’ll go ahead and close this issue as it’s not actionable, but feel free to ask any clarifying questions. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found