@auroratide/reorder-list
Version:
Web component for a rearrangeable list of items
17 lines (16 loc) • 382 B
JavaScript
export const CHANGED = "change";
export const COMMIT = "commit";
export const changeEvent = (item, oldIndex, newIndex) => new CustomEvent(CHANGED, {
detail: {
item,
oldIndex,
newIndex,
},
});
export const commitEvent = (item, oldIndex, newIndex) => new CustomEvent(COMMIT, {
detail: {
item,
oldIndex,
newIndex,
},
});