Topic: Selected option from Multiselect not properly selected
support@sync.my pro asked 6 years ago
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>
<optgroup label="team 2">
<option selected value="3">Option 3</option>
<option value="4">Option 4</option>
</optgroup>
<optgroup label="team 3">
<option value="5">Option 5</option>
<option selected value="6">Option 6</option>
</optgroup>
<optgroup label="team 4">
<option selected value="7">Option 7</option>
<option value="8">Option 8</option>
</optgroup>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
Here the screenshot for my inspection and its view generated.
Piotr Glejzer staff answered 5 years ago
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.
Marc BEAUCHAMPS free answered 6 years ago
Hello,
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
Sebastian Kaczmarek staff commented 6 years ago
Hard to say but I can tell you that it won't appear before the end of 2018. Probably right at the beginning of 2019.
Mighty Midget pro commented 5 years ago
Has the fix been released yet? As this is happening on my project too.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.5.10
- Device: Macbook Pro 2013
- Browser: Chrome
- OS: MacOS Sierra
- Provided sample code: Yes
- Provided link: No