From 8299ca5f9dcc56905ccc130e84a084ace4a1be08 Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Mon, 22 Apr 2024 15:22:44 +0200 Subject: [PATCH] Fix unused code --- .../Tabs/DocumentsTabV2/DocumentsTabV2.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx index 723761a0d..48e93974e 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx @@ -278,10 +278,6 @@ const DocumentsTabComponent: React.FunctionComponent<{ visible: true, }; - // TODO: Where is this used? - const documentContentsContainerId = `documentContentsContainer${props.tabId}`; - const documentContentsGridId = `documentContentsGrid${props.tabId}`; - const partitionKey: DataModels.PartitionKey = props.partitionKey || (props.collection && props.collection.partitionKey); const partitionKeyPropertyHeaders: string[] = props.collection?.partitionKeyPropertyHeaders || partitionKey?.paths; @@ -547,8 +543,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( @@ -1122,7 +1118,7 @@ const DocumentsTabComponent: React.FunctionComponent<{ const columnHeaders = { idHeader: props.isPreferredApiMongoDB ? "_id" : "id", - partitionKeyHeaders: partitionKeyPropertyHeaders || [], + partitionKeyHeaders: (showPartitionKey && partitionKeyPropertyHeaders) || [], }; const onSelectedRowsChange = (selectedRows: Set) => { @@ -1472,7 +1468,7 @@ const DocumentsTabComponent: React.FunctionComponent<{ @@ -1522,7 +1518,7 @@ 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.' @@ -1575,7 +1571,7 @@ textInput: filterContent" tabIndex={0} onClick={onHideFilterClick} onKeyDown={onCloseButtonKeyDown} - /*data-bind="click: onHideFilterClick, event: { keydown: onCloseButtonKeyDown }"*/ + /*data-bind="click: onHideFilterClick, event: { keydown: onCloseButtonKeyDown }"*/ > Hide filter