Getting the value that was entered into the input initially
See original GitHub issueI am trying to get the original value that the user types into the input. I have found valueBeforeUpDown
in the state which looks to be exactly what I need but I don’t see any documentation around it. Is valueBeforeUpDown
or a similar property available to use or is it a part of private api? I personally need this value for onSuggestionSelected
and I can make a PR to add this value to the meta values object if need be.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
How do I get the value of text input field using JavaScript?
There are various methods to get an input textbox value directly (without wrapping the input element inside a form element):. Method 1. document....
Read more >How to get the value of text input field using JavaScript
The value attribute specifies the initial value of the Input Text Field. It contains the default value or the user types. Syntax: Get...
Read more >How to Get an Input's Value with JavaScript - Tabnine Academy
Get the value of a text input. Here is a basic example. It creates a text input field, then prints the contents to...
Read more >How to Get the Value of Text Input Field Using ... - W3docs
Read this tutorial and learn about several methods of getting the value of the input textbox value without wrapping the input element inside...
Read more >HTML input value Attribute - W3Schools
An HTML form with initial (default) values: ... "image" - it defines the value associated with the input (this is also the value...
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 Free
Top 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
@aarondack I actually got it working with the
valueBeforeUpDown
property I just didn’t see it documented and wanted to know if I could add it toonSuggestionSelected
.@plee-nm
Gotcha that makes a ton of sense. You can pass arbitrary props within
inputProps
. My suggestion to you would be to pass in anonKeyUp
withininputProps
and then have logic around the arrow keys to get your desired result. I still believe this is something that can be handled outside the scope of this lib. Maybe something like this?