Closed kearns-arthur closed 6 years ago
Hi, indeed there is a nasty bug in our code. It's caused by MutationObservers which are not disconnected on the Material Select re-render. It has been fixed already and will be available in the nearest release. For now, you just need to get rid of the mentioned method and manually rebuild/re-minify the package. Sorry for inconveniences
I see like problem in MDB 4.8.4
Expected behavior
Destroying and rebuilding of a material select list correctly.
Actual behavior
Hangs or crashes the browser.
Your working environment and MDB version information
MDB PRO 4.5.9, Windows, any browser
Resources (screenshots, code snippets etc.)
In 4.5.8 this was not an issue. In 4.5.9 there is a new '_onMutationObserverChange' and it is my assumption this new function is the problem.
Version 4.5.8 Performance
Version 4.5.9 Performance
My script:
function getMakesModels(id) { $.ajax({ type: 'GET', url: uri + "/getmakemodels/" + id, contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { document.getElementById('idxmodels').options.length = 0; $('#idxmodels').append(
); $.each(data, function (i, item) { $('#idxmodels').append(
); }); $('.mdb-select').material_select('destroy'); $('.mdb-select').material_select(); }, failure: function (response) { alert(response.d); }, error: function (response) { alert(response.d); } }); }
For every question of technical nature, in order to get the most detailed answer as soon as possible, ask on our dedicated Support Forum