Topic: Material select with multiple options does not work
Tomst pro asked 6 years ago
We used material select with multiple options and some options disabled.
<select id="testSelect" style="display:block !important;width:100%;height:200px;" multiple="">
<option disabled="" value="">Select</option>
<option disabled="" value="">Group 1</option>
<option value="1-1">Option 1</option>
<option value="1-2">Option 2</option>
<option disabled="" value="">Group 2</option>
<option value="2-1">Option 1</option>
<option value="2-2">Option 2</option>
<option disabled="" value="">Group 3</option>
<option value="3-1">Option 1</option>
<option value="3-2">Option 2</option>
</select>
The style on it is used so we could see the original select with its original select values.
We initialize this with $('#testSelect').materialSelect(); . Now we click on "Select all" in material select - it seems like all the options are selected, but when we look at the real options (and when we do $('#testSelect').val() ), we find out material select selected first six options - with two disabled. Why is that?
Add comment
Sebastian Kaczmarek staff answered 6 years ago
It seems like a bug. We'll fix that as soon as possible. Thanks for pointing out
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Answered
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: Browser
- Browser: Chrome
- OS: Windows 10
- Provided sample code: Yes
- Provided link: No
Tags