Topic: How to set multiple select to multiple values?

Jordan Mack pro asked 1 year ago

Expected behavior Set select to value to array and all options selected

Actual behavior

only the last option is selected

Resources (screenshots, code snippets etc.)

I use to have this functionality in previous versions, not sure what happened. Is there also the ability to allow the select setValue() method to accept integer or throw an error if one is caught?

Thank you

Kamila Pieńkowska staff answered 1 year ago

The setValue() method should accept an array as an argument. This works well but you are misusing multiple attribute. I've prepared a snippet in the second thread you opened.

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: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 6.0.0
  • Device: Intel x86
  • Browser: Chrome
  • OS: Ubuntu 22.04
  • Provided sample code: Yes
  • Provided link: Yes