Topic: Default select option
I want to use the value of a select dropdown as a filter for a table. Using the snippet linked the select loads with the first option selected. Apart from creating a disabled option selected by default is it possible to load the select dropdown without anything selected?
<option value="" disabled selected>Please select an option</option>
Additionally, when the dropdown is created with a data-mdb-clear-button="true" and the selection is cleared it is still returning the first option as it's selected value. This should be null as nothing is selected.
Note that the default select works like this - it shows the first option checked if no value is set. We don't want to change the default behavior, so the first option will always be selected if value is not set.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: 3.0.0
- Device: PC
- Browser: Firefox
- OS: Windows
- Provided sample code: No
- Provided link: Yes