Restore select to initial value
See original GitHub issuehey,
I checked the live preview in the documentation, the button to reset the form (button type="reset"
) causes select not to keep the default value, select is empty
this feature works fine in version 9.0.1, the bug has appeared since version 9.1.0
how to reproduce the issue:
- visit https://choices-js.github.io/Choices/
- change select to a random value
- click the “reset” button
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top Results From Across the Web
Reset select value to default - javascript - Stack Overflow
Reset select value to default · If you want to reset the whole form, just call the built-in JavaScript . · possible duplicate...
Read more >How to reset selected value to default using jQuery
There are two approaches that are discussed below: Approach 1: First select the options using jQuery selectors then use prop() method to get ......
Read more >Reset (Clear) DropDownList selection (selected value) using ...
The following HTML Markup consists of an HTML DropDownList (DropDown) control and a Button. When the Button is clicked, the Reset JavaScript function...
Read more >How do I reset values in a select dropdown - CodeProject
i have a modal with this dropdownlist it is works fine, but when i close i would like to clear this dropdown and...
Read more ><input type="reset"> - HTML: HyperText Markup Language
elements of type reset are rendered as buttons, with a default click event handler that resets all inputs in the form to their...
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
As a temporary workaround in my application I managed to intercept reset event on the form and then repopulate all the options by hand:
This should be unnecessary but at least my app does work. I hope this will be fixed at some point.
@masiorama I tried your code and saw that the event is not triggered:
what’s the problem?
After some minutes
Some points:
Working code: