feat: Add shift-click additive selection for documents in grid view
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user