Closed KevinBatdorf closed 7 years ago
You have to choose one
v-model
(better):selected
+ @change
= more manualNext time, please ask questions on the forum or StackOverflow first, thanks 🙂
Thanks posva. I'm not sure you understood my issue but I'll try to explain it better on the forum. Have a good one!
I solved my problem so I'll just post it here in case someone ends up here looking for an alternative way to solve it using jQuery. It still seems that I should be able to update the attributes in vuejs though but I guess I can't figure it out :D
https://jsfiddle.net/kbatdorf/2ggk4ppo/6/
Thanks again posva!
Version
2.3.0
Reproduction link
https://jsfiddle.net/kbatdorf/2ggk4ppo/1/
Steps to reproduce
Add a select dropdown and update the selected attribute via a computed property
What is expected?
The selected attribute is added
What is actually happening?
The selected attribute is not being added
I need this because I'm using the DataTables plugin with an option to print the table in CSV format. By default it includes each option in the table so I need to filter out the values that are currently selected and only display those in the CSV table.
Unfortunately, DataTables passes only a string of the html element (which is why I included it in the example) to be edited and since the selected attribute isn't being added on, I cannot determine which is selected.
Thanks