Topic: Selected option from Multiselect not properly selected
I have issue to show selected option with multiselect form, the mdb layout not showing the correct selected option as showing in standard html as I inspected.
Here is the sample code:
<select class="mdb-select md-form" multiple>
<optgroup label="team 1">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<optgroup label="team 2">
<option selected value="3">Option 3</option>
<option value="4">Option 4</option>
<optgroup label="team 3">
<option value="5">Option 5</option>
<option selected value="6">Option 6</option>
<optgroup label="team 4">
<option selected value="7">Option 7</option>
<option value="8">Option 8</option>
<button class="btn-save btn btn-primary btn-sm">Save</button>
Here the screenshot for my inspection and its view generated.
This is clearly a bug. We'll fix that
I do have the same issue.
Is a fix coming soon, or should i find another solution (This component was pretty useful on my project)?
Thanks by advance
I already fixed that. If someone wants to use a fix for that so you have to do for your own for now. It will be fixed globally in the next release.
At function renderMaterialSelect() you have to find
const = $(element).index();
and change it to
const = element.index;
It should be work.
- User: Pro
- Premium support: No
- Technology: jQuery
- MDB Version: 4.5.10
- Device: Macbook Pro 2013
- Browser: Chrome
- OS: MacOS Sierra
- Provided sample code: Yes
- Provided link: No