czeckd/angular-dual-listbox

moving elements in confirmed list box (arranging)

siddesai36 opened this issue · 4 comments

Hello,

I was wonder is there a method or a property that would let me arrange the elements in confirmed (destination array of objects) list. For ex. If my confirmed list has MN, WA, IA and in the same list i want to drag MN from index one to 3. so the end result is confirmed list WA, IA , MN. Also thank you for help

You can set the dual-list to sort the destination, but it doesn't support reordering. If it's unsorted, then it confirmed items will be in order of addition.

Thank you for replying. So yes what you mentioned above is absolutely correct. So to support reordering I got started with creating custom component that extends DualListComponent. I think it's possible but i dont truly understand the architecture behind it. So I was hoping for your assistant on which methods to override to make it work. Thanks again.

Yeah it's doable. You will probably need to look at the drag-and-drop related functions and make them so they can self-target and then recognize the reordering. Good luck.

is there a repo I can have a look on for rearranging items.