mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-19 02:37:25 +00:00
15 lines
468 B
TypeScript
15 lines
468 B
TypeScript
import * as ko from "knockout";
|
|
import DocumentId from "./DocumentId";
|
|
import DocumentsTab from "../Tabs/DocumentsTab";
|
|
|
|
export default class ObjectId extends DocumentId {
|
|
constructor(container: DocumentsTab, data: any, partitionKeyValue: any) {
|
|
super(container, data, partitionKeyValue);
|
|
if (typeof data._id === "object") {
|
|
this.id = ko.observable(data._id[Object.keys(data._id)[0]]);
|
|
} else {
|
|
this.id = ko.observable(data._id);
|
|
}
|
|
}
|
|
}
|