I'm using vue-multiselect for a single select from an array of objects used as options.
Both the options and the selected option belong to a Vuex store. I have followed the "Vuex Support" section from documentation.
The thing is: when I change the selected object within the options array, it does not reflect in the selected option, as expected.
This is happening because the selected object is different from the original object. It is a deepClone copy.
I think this should be at least highlighted in that documentation section. I expected to see reactivity intact, but the fact that the selected value is a copy of the original object really surprised me. I will have to search for the object in the original array by ID, in order to commit/dispatch the same object as the selected one. Not a clone.
Yeah. That鈥檚 something I believe we could get rid off in the 3.0 release. Thanks for the suggestion! :)
(updated the issue name)
This behavior really surprised and disappointed me, and I'm not using VueX. Why does this dropdown need to deep clone anything?
That鈥檚 a legacy thing I want to get rid off.
Deep cloning is removed on the current master. Working on the release.
Deep cloning is removed on the current master. Working on the release.
Has this fix been released?
I'm having the same issue with v 2.1.6
Most helpful comment
Deep cloning is removed on the current master. Working on the release.