How to access source(from) and target(to) item list on callback
Amitesh opened this issue · 2 comments
Hi,
Thank you for wonderful library.
I was trying to implement it in one of learning POC with multi-list drag&drop application like JIRA board.
I was trying to access the source(from) and target(to) item list on onAdd()
, onRemove()
options callback. It is only giving the oldindex
and newindex
to me. My lists are with parent
component and each list
is reside in individual component. Current list(dropped list) is not aware about the source
of the new item
. I need to apply business logic through RESTful apis on server.
Can you suggest, how i can access it?
I have gone through the event interface which has no info about the to-from
lists.
interface SortableEvent {
oldIndex: number;
newIndex: number;
oldDraggableIndex?: number;
newDraggableIndex?: number;
item: HTMLElement;
clone: HTMLElement;
}
Thanks.
Any updates on this...
I need access to the item that was moved or cloned.
unfortunately the library only passes raw HTMLElements to the onAdd
and onRemove
is there any way to pass the added or removed data
along with the method?
+1 but it seems no-one is maintaining this?