Topic: Performance mdb select

Pradtke pro asked 3 years ago


We would like to refill (reinitialize) the "mdb select" control and reset the contained data first. We use the command "$('.mdb-select').material_select('destroy');" according to the documentation. ([https://mdbootstrap.com/support/general/re-initialize-a-select-field)

If we use the function in this way, the performance breaks down and the browser allocates a lot of RAM.

We have created two snippets of code to illustrate the performance slump :

https://mdbootstrap.com/snippets/jquery/pradtke/1316489

https://mdbootstrap.com/snippets/jquery/pradtke/1316521

Regards

Pradtke


Pradtke pro answered 3 years ago


That is the solution ...

Thanks !

Pradtke


Sebastian Kaczmarek staff answered 3 years ago


Sorry for the inconvenience. The problem here may be with the auto-refreshing of the Material Select on each new option added. You can disable this feature by adding the data-stop-refresh="true" attribute to the <select> control. See my snippet: https://mdbootstrap.com/snippets/jquery/s-kaczmarek/1320904



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.10
  • Device: Windows-PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes