Click on button change select


Topic: Click on button change select

Neanrakyr pro premium priority asked 6 months ago

Hello I write a script :

Change an Option value in the Select attribute when you click on a button.

Here is the Snipped code https://mdbootstrap.com/snippets/standard/neanrakyr/2514494

So due to the class="select" in the Select the script don't work.

Can you help me to fixed it ?


Mikołaj Smoleński staff answered 6 months ago

I made some changes in your snippet and now it works correct. There is a method setValue for this case. Best regards


Neanrakyr pro premium priority commented 6 months ago

Thank you it work perfectly !!! :D


joannarom pro premium priority commented 1 months ago

Have I missed something? Why isn't .getInstance() documented in the API?


Please insert min. 20 characters.
Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB 5
  • MDB Version: 1.0.0
  • Device: Desktop / Mobile
  • Browser: Any
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes