You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Vue and gridstack. The widgets(i.e, Vue components) rendered by an array from vue.$data.widgets. When adding a widget, I call grid.addWidget() at Vue component mounted event. It is works.
However, I cannot figure out at good place to call grid.removeWidget(). Basically, if call vue.$data.widgets.splice(idx,1), vue will automatically reflects to UI - that gridstack widget is deleted but it leaves a blank area at deleted widget place. I think grid.removeWidget() needs to called somewhere. I tried "destroyed" or "beforeDestroy" event in that vue component. But gridstack reports error in removeWidget() - the node is undefined at subsequence removeNode() method.
I also try to call removeWidget() before vue updates $data.widgets.splice(), that will cause vue exception.
So, is it possible refresh the widgets layout rather than by removeWidget()/addWidget()?
The text was updated successfully, but these errors were encountered:
I use Vue and gridstack. The widgets(i.e, Vue components) rendered by an array from vue.$data.widgets. When adding a widget, I call grid.addWidget() at Vue component mounted event. It is works.
However, I cannot figure out at good place to call grid.removeWidget(). Basically, if call vue.$data.widgets.splice(idx,1), vue will automatically reflects to UI - that gridstack widget is deleted but it leaves a blank area at deleted widget place. I think grid.removeWidget() needs to called somewhere. I tried "destroyed" or "beforeDestroy" event in that vue component. But gridstack reports error in removeWidget() - the node is undefined at subsequence removeNode() method.
I also try to call removeWidget() before vue updates $data.widgets.splice(), that will cause vue exception.
So, is it possible refresh the widgets layout rather than by removeWidget()/addWidget()?
The text was updated successfully, but these errors were encountered: