Topic: MaterialSelect performance issue

Lemaire free asked 3 years ago

Expected behavior

No performance issue (ie. no freeze) while clicking on the select to open the options.

Actual behavior

Currently we have performance issues when we use two MaterialSelect in cascade. When we select an option in the first select, it replaces the items in the second select. By doing this manipulation several times (without modifying the second select), the browser begins to slow down and may block. You will find a code snippet bellow.

Resources (screenshots, code snippets etc.)

To use this code snippet, just select different options in the first MaterialSelect. Don't select anything in the second select.

Tomek Makowski staff commented 3 years ago

Hi, it looks like a bug with our package. We will try to fix it in next release


Lemaire free commented 3 years ago

Hi, do you plan to fix this bug soon ? We need a fix or, at least, a workaround.


Grzegorz Bujański staff answered 3 years ago


We will fix it as soon as possible. For now, to prevent this error, do this: add to selectTwo data-stop-refresh='true' and selectTwo.materialSelect(); to the code of the on change event.

Here you will find a fixed snippet that no longer crashes the browser:

I hope this will fix your problem until we release a fix.

I have the same issue. It seems that if you don't select anything from select after init process, some option manipulations from JQuery code will eventually freeze the browser tab.

I Have two questions regarding to this

  1. When is the next release intended to be published?
  2. Is there any way we can artificially "force" an option selection to workaround this in the mean time? I've tried to select an option, trigger changes, restart mdb... with no results

Tomek Makowski staff commented 3 years ago

  1. We don't know when exactly will be next release
  2. What do you mean exactly?

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: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.1
  • Device: Any
  • Browser: Firefox, Chrome, Edge
  • OS: Any
  • Provided sample code: No
  • Provided link: Yes