Mdb-select get selected value


Topic: Mdb-select get selected value

Wojcik asked 4 years ago

When i use https://mdbootstrap.com/docs/vue/forms/select/ "Material select PRO" a can't get selected value. I need help, With i can get selected value.

Regards Krystian Wójcik


Mikołaj Smoleński staff commented 4 years ago

All data is placed inside options data array. To get selected value You just need to find or filter the object with selected key set to true.

Here's an example options array with first option selected:

options: [
  { text: "Option nr 1", value: "Option 1", selected: true },
  { text: "Option nr 2", value: "Option 2" },
  { text: "Option nr 3", value: "Option 3" },
  { text: "Option nr 4", value: "Option 4" },
  { text: "Option nr 5", value: "Option 5" }
]

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

Open

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.2
  • Device: PC
  • Browser: Google Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes
Tags