Dropdown
No Options
Deselectable
Searchable
Disabled
OnChange
Output for onchange event:Options & Rules
Options are set on the HTML div element, no additional javascript is required for the custom drop down to display or work. There are several optional data- attributes that can be used for customisation as follows:
- deselectable - value of '0' OR '1' accepted, 0 being default and not deselectable and 1 being deselectable
- placeholder* - default will be "Select An Option..." or whatever is in the placeholder attribute of the select element
* To get a placeholder element to work add a blank option field that is selected and disable otherwise the first option will shown. e.g.
<select id="test">
<option selected disabled></option>
<option value="1">test1</option>
<option value="2">test2</option>
</select>
** All select fields must have an id to work.
*** Search will automatically be added for more than 8 options
**** If the base select field contains a onchange event this will be fired.