Material select


Topic: Material select

Boris Akimenko pro asked 2 years ago

Expected behavior*Secondary initialization will not takes effect on already initialized selectors.*Actual behavior*Secondary initialization takes effect on already initialized selectors and generates double views on the same selectors.*Resources (screenshots, code snippets etc.)http://joxi.ru/GrqWbLlHQey0R2http://joxi.ru/nAyO0qpTYxGDVm

This is update of https://mdbootstrap.com/support/jquery/secondary-initialize-mdb-select-is-possible/


cdenby pro answered 2 years ago

Why not this?

$("select.mdb-select:not(.initialized)").materialSelect();

Sebastian Kaczmarek staff pro premium answered 2 years ago

It had been resolved already but it looks like it appeared again. We'll fix it.


Piotr Glejzer staff answered 2 years ago

Did you try use something like this?

 $('.your-class or #id').materialSelect('destroy');
 $('.your-class or #id').materialSelect();

Please insert min. 20 characters.