I expect to see the updated list in my listUpdate method. But list gets updated afterlistUpdate is called, forcing me to use a setTimeout(func, 0) or Vue.nextTick(func) hack to see the updated variable. It would be better if the new updated variable was available when @update fires.
So I expect this to show what is now the first element, but in fact it will show the first element before i sorted them:
Some other way to get the new value of list from listUpdate would also be good. The sortable doc says to access it as evt.to, but then I get the updated DOM node, where I want the Vue model variable.
This reproduces in 0.1.3 and 0.1.5. 0.1.4 didn't work.
If I have:
I expect to see the updated
list
in mylistUpdate
method. Butlist
gets updated afterlistUpdate
is called, forcing me to use asetTimeout(func, 0)
orVue.nextTick(func)
hack to see the updated variable. It would be better if the new updated variable was available when@update
fires.So I expect this to show what is now the first element, but in fact it will show the first element before i sorted them:
And this will show the new first element as I expect:
See https://vue-pys8h3.stackblitz.io for a full reproduction.
Some other way to get the new value of
list
fromlistUpdate
would also be good. The sortable doc says to access it asevt.to
, but then I get the updated DOM node, where I want the Vue model variable.This reproduces in 0.1.3 and 0.1.5. 0.1.4 didn't work.