mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 13:40:24 +02:00
add custom rowId support to lists
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user