Material select


Topic: Material select

Boris Akimenko pro asked 6 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 6 years ago

Why not this?

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

Sebastian Kaczmarek staff pro premium answered 6 years ago

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


Piotr Glejzer staff answered 6 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.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.7.4
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: Yes