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: MDB Select dropdown list height is now limited to 4/5 lines how to view more

Olivier PZ priority asked 5 years ago


Expected behavior MDB Select dropdown list height not limited

Actual behavior In 4.10.1 version MDB Select dropdown list height limited to 4/5 line

Resources (screenshots, code snippets etc.)

Max-height automatically set to 147.5px; I would like it to be set to "none" or a higher value but cannot set any other value as Style defined in element overrides Css defined values...

See also this snippet where max-height value is not used : https://mdbootstrap.com/snippets/jQuery/olivier_peuze/1537256

<ul id="select-options-CATEGORY_ID" class="dropdown-content select-dropdown w-100 active" style="display: block; max-height: 147.5px; width: 339.5px; position: absolute; top: 0px; left: 0px; opacity: 1;">

Mateusz Łubianka staff answered 5 years ago


Hi @Olivier PZ,

You can see only five options, because the default visibleOptions = 5. You can change it using this code:

$('.mdb-select').materialSelect({ visibleOptions: 10 });

You can find more info here: https://mdbootstrap.com/docs/jquery/forms/select/#select-options-and-attributes

If you want to do it with css, you have to use max-height:800px!important;.

Best,



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: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: 4.10.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows10
  • Provided sample code: No
  • Provided link: Yes