diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx
index ebd6ec45f..3316eaffb 100644
--- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx
+++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx
@@ -258,7 +258,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
case ViewModels.DocumentExplorerState.exisitingDocumentNoEdits:
case ViewModels.DocumentExplorerState.exisitingDocumentDirtyInvalid:
case ViewModels.DocumentExplorerState.exisitingDocumentDirtyValid:
- return true;
+ return selectedRows.size > 0;
default:
return false;
}
@@ -329,7 +329,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
}, []);
// If editor state changes, update the nav
- // TODO Put whatever the buttons callback use in the dependency array
+ // TODO Put whatever the buttons callback use in the dependency array: find a better way to maintain
useEffect(
() => updateNavbarWithTabsButtons(),
[editorState, selectedDocumentContent, initialDocumentContent, selectedRows, documentIds],
@@ -502,8 +502,8 @@ const DocumentsTabComponent: React.FunctionComponent<{
? `the selected ${selectedRows.size} items`
: "the selected item"
: isPlural
- ? `the selected ${selectedRows.size} documents`
- : "the selected document";
+ ? `the selected ${selectedRows.size} documents`
+ : "the selected document";
const msg = `Are you sure you want to delete ${documentName}?`;
useDialog.getState().showOkCancelModalDialog(
@@ -1132,7 +1132,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
@@ -1182,14 +1182,14 @@ const DocumentsTabComponent: React.FunctionComponent<{
}
value={filterContent}
onChange={(e) => setFilterContent(e.target.value)}
- /*
+ /*
data-bind="
- W attr:{
- placeholder:isPreferredApiMongoDB?'Type a query predicate (e.g., {´a´:´foo´}), or choose one from the drop down list, or leave empty to query all documents.':'Type a query predicate (e.g., WHERE c.id=´1´), or choose one from the drop down list, or leave empty to query all documents.'
- },
- css: { placeholderVisible: filterContent().length === 0 },
- textInput: filterContent"
- */
+ W attr:{
+ placeholder:isPreferredApiMongoDB?'Type a query predicate (e.g., {´a´:´foo´}), or choose one from the drop down list, or leave empty to query all documents.':'Type a query predicate (e.g., WHERE c.id=´1´), or choose one from the drop down list, or leave empty to query all documents.'
+ },
+ css: { placeholderVisible: filterContent().length === 0 },
+ textInput: filterContent"
+ */
/>
@@ -1235,7 +1235,7 @@ data-bind="
tabIndex={0}
onClick={onHideFilterClick}
onKeyDown={onCloseButtonKeyDown}
- /*data-bind="click: onHideFilterClick, event: { keydown: onCloseButtonKeyDown }"*/
+ /*data-bind="click: onHideFilterClick, event: { keydown: onCloseButtonKeyDown }"*/
>