diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx index e3309ee86..29cc224f5 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx @@ -6,6 +6,7 @@ import { getErrorMessage, getErrorStack } from 'Common/ErrorHandlingUtils'; import { queryDocuments } from 'Common/dataAccess/queryDocuments'; import { readDocument } from 'Common/dataAccess/readDocument'; import { useDialog } from 'Explorer/Controls/Dialog'; +import { EditorReact } from 'Explorer/Controls/Editor/EditorReact'; import { querySampleDocuments, readSampleDocument } from 'Explorer/QueryCopilot/QueryCopilotUtilities'; import DocumentsTab from 'Explorer/Tabs/DocumentsTab'; import { dataExplorerLightTheme } from 'Explorer/Theme/ThemeUtil'; @@ -456,6 +457,11 @@ const DocumentsTabComponent: React.FunctionComponent<{ return () => resizeObserver.disconnect(); // clean up }, []); + const columnHeaders = { + idHeader: isPreferredApiMongoDB ? "_id" : "id", + pkeyHeaders: partitionKeyPropertyHeaders + }; + return
- + loadNextPage(false)}>Load more
-
{JSON.stringify(currentDocument, undefined, " ")}
+
+ { }} + /> +
-
; + ; } diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx index ab1db5c13..013af9de6 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx @@ -11,6 +11,10 @@ export interface IDocumentsTableComponentProps { items: DocumentsTableComponentItem[]; onSelectedItem: (index: number) => void; size: { height: number; width: number }; + columnHeaders: { + idHeader: string; + partitionKeyHeader: string; + }; style?: React.CSSProperties; }