Topic: Cannot open MDB Select option dynamically
IT_Santini priority asked 2 years ago
Expected behavior Can open Select in javascript runtime code as document suggest https://mdbootstrap.com/docs/standard/forms/select/#docsTabsAPI
Actual behavior Cannot open select after javascript initialize, in my experience the workaround is to add timeout function and wait about 100ms to open
Resources (screenshots, code snippets etc.) https://mdbootstrap.com/snippets/standard/it_santini/3816831
Grzegorz Bujański staff answered 2 years ago
If you decide to initialize with JS, do not add the CSS 'select' class - the presence of this class causes auto-initialization via class. I checked your snippet and made 2 changes - deleted CSS select
class, added id mySelect
. Everything works fine after these changes. Check out this snippet: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/3818137#js-tab-view
IT_Santini priority commented 2 years ago
I have updated my snippet, please check https://mdbootstrap.com/snippets/standard/it_santini/3816831#js-tab-view
Grzegorz Bujański staff commented 2 years ago
ok. In this case there is actually a problem. We need to check it out and debug why this is happening. I have added this to our to-do list and we will fix it as soon as possible
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.11.0
- Device: Laptop
- Browser: Chrome
- OS: Windows 10 64bit
- Provided sample code: No
- Provided link: Yes