Recently I have to use vue-draggable for existing components which are acting as dashboard widgets. Drag and Drop feature worked well. But after User sort the order of the widgets, I had to save the sorting order to the DB in order to retrieve the widget order when the user logged in to the system next time.
So my initial code was like this.
I have tried to use the few ways but one of my colleague (Uthpala) passed me this link.
Array of Components?
Hi there. I'm looking for a way to be able to sort vue components. My initial thought was to have an array of…
Also with some exploration I got this resource also
Passing props dynamically to dynamic component in VueJS
I've a dynamic view: <div id="myview"> <div :is="currentComponent"></div> </div> with an…
Finally I managed to fix my problem using below code snippet.
I hope some vueJS dev can get help from this.
Thank goes to