Secondary initialized $(‘.mdb-select’).material_select(); gives multiple material view on already initialized selects.
So if I dynamically add some <select> element, then I have to get this element and initialize it instead just run $(‘.mdb-select’).material_select().
Can You try to give select a new class each time You add the next select? Then You can initialize only this select without changing the others.
or destroy and create mdb-select, but’s more expensive to browser cpu-usage
// Material Select Destroy $('.mdb-select').material_select('destroy');
Boris, is Alex solution working in Your project?
Thank you Alex!
But destroy is not good way as you say 🙂
Init function must check selects by class which added when it initialized
Thanks for sharing Your solution!
Please login or Register to submit your answer