Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onDragDrop(event: ThyDragDropEvent) {
let afterId: string;
const suiteId: string = event.previousItem.origin._id;
const parenId: string =
event.position === ThyDropPosition.in ? event.item.origin._id : event.item.parentNode.origin._id;
const newIndex = event.currentIndex;
if (newIndex === 0) {
afterId = '';
} else {
afterId = event.containerItems[event.currentIndex - 1].origin._id;
}
}