DocumentsPanel
This commit is contained in:
@@ -389,8 +389,6 @@ const AppLayout = () => {
|
||||
[selectedEntries],
|
||||
);
|
||||
|
||||
const selectionCount = selectedDocumentIds.length;
|
||||
|
||||
const selectedFolderIds = useMemo(
|
||||
() =>
|
||||
selectedEntries
|
||||
@@ -3135,9 +3133,6 @@ const AppLayout = () => {
|
||||
if (row.type === 'folder') {
|
||||
selectFolder(row.id);
|
||||
} else if (row.type === 'document') {
|
||||
if (selectionCount === 0) {
|
||||
detailPanelControlRef.current.open();
|
||||
}
|
||||
openDocumentPreview(row.id);
|
||||
}
|
||||
return;
|
||||
@@ -3170,14 +3165,10 @@ const AppLayout = () => {
|
||||
|
||||
setFocusedRowKey(targetRow.key);
|
||||
|
||||
const hadSelection = selectionCount > 0;
|
||||
handleRowSelection(targetRow.key, {
|
||||
shiftKey,
|
||||
preventDefault: () => {},
|
||||
});
|
||||
if (targetRow.type === 'document' && !hadSelection) {
|
||||
detailPanelControlRef.current.open();
|
||||
}
|
||||
},
|
||||
[
|
||||
navigableRows,
|
||||
@@ -3187,7 +3178,6 @@ const AppLayout = () => {
|
||||
handleRowSelection,
|
||||
selectFolder,
|
||||
openDocumentPreview,
|
||||
selectionCount,
|
||||
setFocusedRowKey,
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user