Dropdown list crashing with 100+ items


Topic: Dropdown list crashing with 100+ items

giel831 pro asked 2 weeks 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 2 weeks 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.