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

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.)

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:

IT_Santini priority commented 2 years ago

I have updated my snippet, please check

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

Please insert min. 20 characters.


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



Specification of the issue

  • 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