mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
12 lines
390 B
TypeScript
12 lines
390 B
TypeScript
|
import {DocModel, IRowModel, refRecord, ViewRec} from 'app/client/models/DocModel';
|
||
|
import * as ko from 'knockout';
|
||
|
|
||
|
// Represents a page entry in the tree of pages.
|
||
|
export interface PageRec extends IRowModel<"_grist_Pages"> {
|
||
|
view: ko.Computed<ViewRec>;
|
||
|
}
|
||
|
|
||
|
export function createPageRec(this: PageRec, docModel: DocModel): void {
|
||
|
this.view = refRecord(docModel.views, this.viewRef);
|
||
|
}
|