Topic: Material Select blanks in option ignored and pushes to first disabled option

cdenby pro asked 4 years ago


Expected behavior If I have a mdb-select that has a selected blank whitespace option, but also has any number of disabled options, it should show as blank.

Actual behavior In this case, the actual display picks the first disabled option to show in the input box instead of the blank.

Resources (screenshots, code snippets etc.)

In this example, the selected value appears as "3"!

<select class="mdb-select ddTemplate initialized" 
    data-visible-options="-1" 
    onchange="DoSomething(this);">
    <option value="" selected="selected">&nbsp;</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3" disabled="disabled">3</option>
    <option value="4" disabled="disabled">4</option>
    <option value="5" disabled="disabled">5</option>
</select>

Code Snippet:Snippet of the issue with additional behaviours


Tomek Makowski staff commented 4 years ago

Hi

This is an issue with our package and we add this problem to our "To do" list

Regards and thanks for reporting



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.17.0
  • Device: PC
  • Browser: Chrome
  • OS: W10
  • Provided sample code: No
  • Provided link: Yes