Topic: MDBSelect multiple not showing preselected data

tnhnet priority asked 1 year ago


Hello,

Expected behavior MDBSelect multiple should pre-select the v-model:selected values in the options list

Actual behavior I have multiple MDBSelect with multiple option, when binding v-model:selected to an existing array it doesnt show the options as selected.

Resources (screenshots, code snippets etc.) where staffModules is an array of {text:..., value: ...} and location.modules is an array of strings


tnhnet priority commented 1 year ago

I'm experiencing the same issue with single select component too


Bartosz Cylwik staff answered 1 year ago


Hello! v-model:selected is a readonly value. You can set element as selected by adding selected:true value to your objects in options array. I have prepared a snippet for you to show how it works.

Best regards!



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: Priority
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 3.0.0
  • Device: Any
  • Browser: Edge
  • OS: MACOS
  • Provided sample code: No
  • Provided link: No