diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx index 006ea9052..c26256178 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx @@ -46,7 +46,6 @@ import { DocumentsTableComponent, DocumentsTableComponentItem } from "./Document export class DocumentsTabV2 extends TabsBase { public partitionKey: DataModels.PartitionKey; - private documentIds: DocumentId[]; private title: string; @@ -55,6 +54,7 @@ export class DocumentsTabV2 extends TabsBase { this.documentIds = options.documentIds(); this.title = options.title; + this.partitionKey = options.partitionKey; } public render(): JSX.Element { @@ -1041,6 +1041,13 @@ const DocumentsTabComponent: React.FunctionComponent<{ return; } + // Mongo uses BSON format for _id, trying to parse it as JSON blocks normal flow in an edit + // Bypass validation for mongo + if (props.isPreferredApiMongoDB) { + onValidDocumentEdit(); + return; + } + try { JSON.parse(newContent); onValidDocumentEdit();