Selects with data-mdb-clear-button and zero options generate


Topic: Selects with data-mdb-clear-button and zero options generates an error

Joachim Schneider pro premium priority asked 2 weeks ago

A select generates unexpected JavaScript error:

Expected behavior - No error - Dropdown with empty options

Actual behavior - JavaScript error

Resources (screenshots, code snippets etc.)

<select data-mdb-select-init data-mdb-clear-button="true"></select>
<label class="form-label select-label">
  Zero options with clear-button => Error
</label>

Kamila Pieńkowska staff answered 2 weeks ago

We will fix this. For now, you can initiate select with a hidden option if you have no options to display.

https://mdbootstrap.com/snippets/standard/kpienkowska/6322326


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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 8.1.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No