Topic: MDBSelect multiple not showing preselected data
tnhnet priority asked 2 years 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
Bartosz Cylwik staff answered 2 years 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!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- 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
tnhnet priority commented 2 years ago
I'm experiencing the same issue with single select component too