Topic: Select max options limit

parson premium asked 2 years ago


I am trying to set a limit for the maximum number of options that can be selected. There isn't a native way of setting this so I added an event listener for ''.

If the number of selected options is >= 5 then it iterates through the list of options setting them to disabled. This works perfectly well apart from the dropdown refuses to close.

It throws an error

Uncaught TypeError: can't access property "selected", this._selectAllOption is null

I've created a snippet Select Max Option Errors

Kamila Pieńkowska staff answered 2 years ago

This is because we have a problem with using the select component with Select all and Filter together. It will throw this error even without your customization.
We are aware of this bug and will fix it soon.

parson premium commented 2 years ago

I can't see anything in the changelog for 4.3.0 related to this. I assume it missed the cutoff date to be included. Do you know when you plan to release the fix?

Kamila Pieńkowska staff commented 2 years ago

It is done and waits for the next release.

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.2.0
  • Device: PC
  • Browser: Firefox/Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes