mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-28 05:11:31 +00:00
Initial Move from Azure DevOps to GitHub
This commit is contained in:
14
src/Explorer/Tree/ObjectId.ts
Normal file
14
src/Explorer/Tree/ObjectId.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as ko from "knockout";
|
||||
import * as ViewModels from "../../Contracts/ViewModels";
|
||||
import DocumentId from "./DocumentId";
|
||||
|
||||
export default class ObjectId extends DocumentId implements ViewModels.DocumentId {
|
||||
constructor(container: ViewModels.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user