Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: How to set multiple select to multiple values?

Jordan Mack pro asked 2 years 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

https://mdbootstrap.com/snippets/standard/jps_mack/4691879#js-tab-view


Kamila Pieńkowska staff answered 2 years 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.

FREE CONSULTATION

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

Status

Answered

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