Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(sortListSelector, options) {
if ($(sortListSelector).length > 0) {
sortable(sortListSelector, options)[0].addEventListener("sortupdate", (event) => {
const $children = $(event.target).children();
if (options.onSortUpdate) {
options.onSortUpdate($children);
}
});
}
}
}