Fix unused code

This commit is contained in:
Laurent Nguyen 2024-04-22 15:22:44 +02:00
parent 60a3a5ffcf
commit 8299ca5f9d

View File

@ -278,10 +278,6 @@ const DocumentsTabComponent: React.FunctionComponent<{
visible: true, visible: true,
}; };
// TODO: Where is this used?
const documentContentsContainerId = `documentContentsContainer${props.tabId}`;
const documentContentsGridId = `documentContentsGrid${props.tabId}`;
const partitionKey: DataModels.PartitionKey = const partitionKey: DataModels.PartitionKey =
props.partitionKey || (props.collection && props.collection.partitionKey); props.partitionKey || (props.collection && props.collection.partitionKey);
const partitionKeyPropertyHeaders: string[] = props.collection?.partitionKeyPropertyHeaders || partitionKey?.paths; const partitionKeyPropertyHeaders: string[] = props.collection?.partitionKeyPropertyHeaders || partitionKey?.paths;
@ -547,8 +543,8 @@ const DocumentsTabComponent: React.FunctionComponent<{
? `the selected ${selectedRows.size} items` ? `the selected ${selectedRows.size} items`
: "the selected item" : "the selected item"
: isPlural : isPlural
? `the selected ${selectedRows.size} documents` ? `the selected ${selectedRows.size} documents`
: "the selected document"; : "the selected document";
const msg = `Are you sure you want to delete ${documentName}?`; const msg = `Are you sure you want to delete ${documentName}?`;
useDialog.getState().showOkCancelModalDialog( useDialog.getState().showOkCancelModalDialog(
@ -1122,7 +1118,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
const columnHeaders = { const columnHeaders = {
idHeader: props.isPreferredApiMongoDB ? "_id" : "id", idHeader: props.isPreferredApiMongoDB ? "_id" : "id",
partitionKeyHeaders: partitionKeyPropertyHeaders || [], partitionKeyHeaders: (showPartitionKey && partitionKeyPropertyHeaders) || [],
}; };
const onSelectedRowsChange = (selectedRows: Set<TableRowId>) => { const onSelectedRowsChange = (selectedRows: Set<TableRowId>) => {
@ -1472,7 +1468,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
<button <button
className="filterbtnstyle queryButton" className="filterbtnstyle queryButton"
onClick={onShowFilterClick} onClick={onShowFilterClick}
/*data-bind="click: onShowFilterClick"*/ /*data-bind="click: onShowFilterClick"*/
> >
Edit Filter Edit Filter
</button> </button>
@ -1522,7 +1518,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
} }
value={filterContent} value={filterContent}
onChange={(e) => setFilterContent(e.target.value)} onChange={(e) => setFilterContent(e.target.value)}
/* /*
data-bind=" data-bind="
W attr:{ 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.' 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} tabIndex={0}
onClick={onHideFilterClick} onClick={onHideFilterClick}
onKeyDown={onCloseButtonKeyDown} onKeyDown={onCloseButtonKeyDown}
/*data-bind="click: onHideFilterClick, event: { keydown: onCloseButtonKeyDown }"*/ /*data-bind="click: onHideFilterClick, event: { keydown: onCloseButtonKeyDown }"*/
> >
<img src={CloseIcon} style={{ height: 14, width: 14 }} alt="Hide filter" /> <img src={CloseIcon} style={{ height: 14, width: 14 }} alt="Hide filter" />
</span> </span>