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: Material Select - MutationObserver problem

Backstuber free asked 6 years ago


We use material select in our application. One page contains select that changes often based on actions on that page - specifically adding and removing options. Problem is this change gets slower and slower. When I checked the code, it seems like there are some MutationObservers to "refresh" material select every time the DOM is changed, but it seems these MutationObservers are not cleared when we call materialSelect('destroy'). Is there a way to clear them?


Sebastian Kaczmarek staff answered 6 years ago


Unless you'll edit the source code there is no option to clear them manually.

However, you can add `data-stop-refresh="true"` attribute to the `<select>` element and the Material Select will not use `MutationObservers`. Please remember that this way you will have to refresh the material select manually on each change.

It will be fixed soon



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: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No