Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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>


Please insert min. 20 characters.

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: 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