Search Field: clear field
See original GitHub issueRelated Issues:
#953 - Search Field: disabled state & fits container #952 - Search Field: autosearch & minLength change
Issue Description
New features to add to the search field component:
- Add programmatic method to clear the search field.
(10/20/2017) Update: generated two new issues to make PR smaller, see Related Issues
Issue Type
- New Feature
- Enhancement
- Bug
- Other
Expected Behavior
- items listed above
Current Behavior
- user click to clear only
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
How To Clear Input Field on Focus
Click on the input field to clear it: Clear Input Field on Focus. Example. <!-- When the input field gets focus, replace its...
Read more >HTML | Clearing the input field
To clear the entire input field without having to delete the whole thing manually Or what if there is already a pre-suggested input...
Read more >Targeting Click of “Clear” Button (X) on Input Field
Everything is working as you expect – you can enter text into the search box, hit enter or the "Search" button, and see...
Read more >How do I put a clear button inside my HTML text input box ...
Nowadays with HTML5, it's pretty simple: <input type="search" placeholder="Search..."/>. Most modern browsers will automatically render a ...
Read more >How to Clear Input Fields in JavaScript
To clear input fields in JavaScript, use the onfocus event and target property,onclick event and document.getElementById() method or the reset() method.
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
These can be achieved by exposing the value of the input through a
value
prop similar to the text field. This would make the input a controlled input.Sorry for the late response, @kschuste, I think what you have is more what I was thinking.