Topic: Deropdown select with multiple clone not able to get value
modadvisor
free
asked 5 years ago
Dear Sir,
I have select drop down with dynamic add more features when i post data i am not able to getting index in the get value function. any possibility that i can pass any extra parameters ?
i have tried below code
Mikołaj Smoleński
staff
answered 5 years ago
First of all, we recommend to use two-way data binding v-model instead of manual options applying. Here's an example code:
<mdb-select
v-model="basicOptions"
placeholder="Select an option"
label=""
/>
and data:
data() {
return {
basicOptions: [
{ text: "Option nr 1", value: "Option 1" },
{ text: "Option nr 2", value: "Option 2" },
{ text: "Option nr 3", value: "Option 3" }
]
};
}
After each change, picked option gets and attribute selected. You can easily get the selected item by filtering options (in this case it would be basicOptions).
Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Vue
- MDB Version: 6.7.1
- Device: PC
- Browser: google chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
modadvisor free commented 5 years ago
here is code snippet link
https://mdbootstrap.com/snippets/vue/modadvisor/2637643?action=forum_snippet