feat: Add shift-click additive selection for documents in grid view

This commit is contained in:
2025-11-28 20:50:24 +01:00
parent 0b45eeb2d4
commit 41555bb57d
3 changed files with 15 additions and 3 deletions
@@ -1141,7 +1141,13 @@ const useDocumentsWorkspace = ({
const key = rowKey
|| (type === EntryType.document ? createDocumentEntryKey(id) : createFolderEntryKey(id));
if (key) {
handleEntrySelection(key, event);
if (documentsViewMode === 'grid' && (event as any).shiftKey) {
// Additive selection for Shift+Click in Grid View
const newSelection = Array.from(new Set([...selectedEntries, key]));
applySelection(newSelection, { anchor: key, interactedKeys: [key] });
} else {
handleEntrySelection(key, event);
}
}
if (type === EntryType.folder && !modifierClick && primaryClick) {
selectFolder(id);