tom-select
tom-select copied to clipboard
clear() method empty the visible tom-select field, but set the select field to the default selected option
trafficstars
Describe the bug
When tom-select is used on a field with '', the clear() method empty the tom-select field, but the <select> field value is set to the default value as set by selected="selected" attribute.
To Reproduce
- Go to tom-select.js clear() method empty tom-select.js but set the value to the default field value @ CodePen
- Click on
Reset - Click on
Submitto view field value at submit.
Expected behavior
Tom-Select should have two methods:
clear()should empty the field and set the initial select to empty.reset()should set the initial select to its initial value and update the associated tom-select to the initial value, and should be called by the form reset event (see #544 ).
This issue has not been active in 120 days and has been marked "stale". Remove stale label or comment or this will be closed in 15 days
This issue has not been active in 120 days and has been marked "stale". Remove stale label or comment or this will be closed in 15 days