add custom rowId support to lists

This commit is contained in:
jeffvli
2025-11-13 02:55:00 -08:00
parent 595d92efd9
commit a484628e13
9 changed files with 383 additions and 184 deletions
@@ -46,12 +46,18 @@ export const getDraggedItems = (
return [];
}
const rowId = internalState.extractRowId(data);
if (!rowId) {
return [];
}
const draggedItem = data as ItemListStateItemWithRequiredProperties;
const previouslySelected = internalState.getSelected();
const isDraggingSelectedItem = previouslySelected.some((selected) => {
if (hasRequiredDragProperties(selected)) {
return selected.id === data.id;
return internalState.extractRowId(selected) === rowId;
}
return false;
});