Topic: Dropdown list crashing with 100+ items

giel831 free asked 4 years ago


Expected behavior Loading a dropdown list with more than 100 items.

Actual behavior The internet page crashes and fails to respond

Resources (screenshots, code snippets etc.) it hangs on the following line in material-select.js: const $select = $(mutation.target).closest('select'); it takes at least 1 or 2 seconds per item to go through this with a large number. Then the page crashes.

mutationsList.forEach((mutation) => {

    const $select = $(mutation.target).closest('select');
    if ($select.data('stop-refresh') !== true && (mutation.type === 'childList' || mutation.type === 'attributes' && $(mutation.target).is('option'))) {

      // eslint-disable-next-line object-curly-newline
      $select.materialSelect({ destroy: true });
      $select.materialSelect();
    }
  });

Krzysztof Wilk staff answered 4 years ago


Hi!

Thanks for your report. We already have task for this problem and we'll try to fix it as soon as possible :)



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: MDB jQuery
  • MDB Version: 4.19.1
  • Device: browser
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No