Topic: selectAllLabel in Material Select Not Working
engineer_yasin premium asked 5 years ago
Hi
Why selectAllLabel in Material Select Not Working?
<div class="col-md-6 my-3">
<select id="lang-pl" class="mdb-select md-form" multiple searchable="Szukaj..." selectAllLabel="Wybierz wszystkie" optionsSelectedLabel="opcji wybranych">
<option value="" disabled selected>Wybierz kraj</option>
<option value="1">Stany Zjednoczone</option>
<option value="2">Niemcy</option>
<option value="3">Francja</option>
<option value="3">Polska</option>
<option value="3">Japonia</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Zapisz</button>
</div>
Resources (screenshots, code snippets etc.) https://mdbootstrap.com/snippets/jquery/temp/1506071
Sebastian Kaczmarek staff answered 5 years ago
As described here, the attributes should be specified as: data-label-select-all
and data-label-options-selected
respectively:
<div class="col-md-6 my-3">
<select id="lang-pl" class="mdb-select md-form" multiple searchable="Szukaj..." data-label-select-all="Wybierz wszystkie" data-label-options-selected="opcji wybranych">
<option value="" disabled selected>Wybierz kraj</option>
<option value="1">Stany Zjednoczone</option>
<option value="2">Niemcy</option>
<option value="3">Francja</option>
<option value="3">Polska</option>
<option value="3">Japonia</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Zapisz</button>
</div>
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Premium
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: 4.10.0
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: Yes