Topic: mdb-select resize after destroy
Jorge Nuñez Malledo free asked 4 years ago
Expected behavior After the material select restart the grid shouldn't be affected in any form. This issue was reported right after version 4.10 release, and surprisingly is still active in version 4.11. Please, provide some workaround and/or ensure this issue in solved in future release
Actual behavior When you perform the Jquery standard materialSelect restart (destroy + init), it seems to be that the destroy method is destroying something else than it shouldn't, because the grid the select belongs to is being unaligned. Check the snippet below
Resources (screenshots, code snippets etc.) https://mdbootstrap.com/snippets/jquery/jorge_nunez_malledo/1636064
Jorge Nuñez Malledo free answered 4 years ago
Well, it should be quick, because unless you state something else,
materialSelect(destroy) materialSelect()
Is the supported way to update select items via jQuery. And I alredy reported this issue for version 4.10.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.11.0
- Device: Lenovo T480
- Browser: Mozilla Firefox 72.0.1 (64 bit)
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes
Grzegorz Bujański staff commented 4 years ago
Hi,
We already have a task to improve this. We will fix it soon.
Best, Grzegorz
Jorge Nuñez Malledo free commented 4 years ago
It seems to be that this issue is still active in version 4.12.0. Check the following snippet:
https://mdbootstrap.com/snippets/jquery/jorge_nunez_malledo/1657391
Please, provide a workaround method to updating/destroying Material Select, because it's not working
Grzegorz Bujański staff commented 4 years ago
Hi,
Sorry about that. We will fix it as soon as possible.
Best, Grzegorz