I’m using tagify to allow users to create lists but would love to be able to offer the option of reordering the items in the list.
It would be really useful to add the drag/sort functionality to the tagify component - requires yairEO’s integration as detailed here:
I appreciate it wouldn’t be too difficult to add a custom extension but think it would be a useful addition to the native Wappler offering. I also know you could create a form with sortable elements that Wappler already offers. What I would love to see is a sortable checkbox in the tagify setup that enables/disables functionality
@patrick I presume it would be you looking at this if it gets the go ahead.
I thought I would have a little go and it seems pretty straight forward to add (I appreciate I haven’t added anything to turn on/off in the UI so will be active on all tagify for this project)
All I needed to do was get the CSS and JS from the yairEO Github project (https://github.com/yairEO/dragsort) and add include them on my page.
I then added:
this.dragsort = new DragSort(this.tagify.DOM.scope, {
selector: '.' + this.tagify.settings.classNames.tag,
callbacks: {
dragEnd: function () { e.tagify.updateValueByDOMTags() }
}
})
to the end of the render function in the dmxTagify script.
I’m sure you may find a more elegant solution but it works for what I want and thought it might save you a bit of time…
Another little bump - every time I update Wappler I have to compare changes (to make sure you haven’t changed something) and merge/revert to the sortable version