selectAllLabel in Material Select Not Working

web
mobile

Topic: selectAllLabel in Material Select Not Working

engineer_yasin pro premium asked a week 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 pro premium answered a week 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>

Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: jQuery
  • MDB Version: 4.10.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes