Topic: Performance mdb select
                  
                  Pradtke
                  pro
                  asked 6 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
                      
                      Sebastian Kaczmarek
                      staff
                        answered 6 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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: 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