From 37940fb297b5a251c0ce2999f52788e9c32b548d Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Thu, 28 Mar 2024 11:45:26 +0100 Subject: [PATCH] Add some TODO's --- .../Tabs/DocumentsTabV2/DocumentsTabV2.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx index 1b9ed6f18..d33149737 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx @@ -112,7 +112,6 @@ const DocumentsTabComponent: React.FunctionComponent<{ ]); const [documentIds, setDocumentIds] = useState([]); const [isExecuting, setIsExecuting] = useState(false); // TODO isExecuting is a member of TabsBase. We may need to update this field. - const [dataContentsGridScrollHeight, setDataContentsGridScrollHeight] = useState(undefined); // Query const [documentsIterator, setDocumentsIterator] = useState<{ @@ -120,11 +119,11 @@ const DocumentsTabComponent: React.FunctionComponent<{ applyFilterButtonPressed: boolean; }>(undefined); const [queryAbortController, setQueryAbortController] = useState(undefined); - const [resourceTokenPartitionKey, setResourceTokenPartitionKey] = useState(undefined); - const [isQueryCopilotSampleContainer, setIsQueryCopilotSampleContainer] = useState(false); + const [resourceTokenPartitionKey, setResourceTokenPartitionKey] = useState(undefined); // TODO: Make this a constant is setter getting called + const [isQueryCopilotSampleContainer, setIsQueryCopilotSampleContainer] = useState(false); // TODO: Make this a constant is setter getting called const [cancelQueryTimeoutID, setCancelQueryTimeoutID] = useState(undefined); - const [isExecutionError, setIsExecutionError] = useState(false); + const [isExecutionError, setIsExecutionError] = useState(false); // TODO: Where is this used? const [onLoadStartKey, setOnLoadStartKey] = useState(props.onLoadStartKey); const [initialDocumentContent, setInitialDocumentContent] = useState(undefined); @@ -271,6 +270,7 @@ const DocumentsTabComponent: React.FunctionComponent<{ visible: true, }; + // TODO: Where is this used? const documentContentsContainerId = `documentContentsContainer${props.tabId}`; const documentContentsGridId = `documentContentsGrid${props.tabId}`; @@ -520,8 +520,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( @@ -828,6 +828,7 @@ const DocumentsTabComponent: React.FunctionComponent<{ return documentsIterator.iterator.fetchNext().then((response) => response.resources); }; + // TODO: use this when generating column headers const showPartitionKey = (() => { if (!props.collection) { return false; @@ -1146,7 +1147,7 @@ const DocumentsTabComponent: React.FunctionComponent<{ @@ -1196,7 +1197,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.' @@ -1249,7 +1250,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