mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Aggregate and reverse lookups
Summary: Reverse and Aggregation lookup. Aggregation lookup works when table have a reference list column. It allow to list value of any fields of a referenced values, or to make some basic operation on them (sum, average, count) Reverse lookup works as reverse one, but it allow do to the same operations on all rows that have reference to given row Test Plan: Manual so far. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D4083
This commit is contained in:
@@ -25,6 +25,8 @@ export type BEHAVIOR = "empty"|"formula"|"data";
|
||||
export interface ColumnRec extends IRowModel<"_grist_Tables_column"> {
|
||||
table: ko.Computed<TableRec>;
|
||||
widgetOptionsJson: ObjObservable<any>;
|
||||
/** Widget options that are save to copy over (for now, without rules) */
|
||||
cleanWidgetOptionsJson: ko.Computed<string>;
|
||||
viewFields: ko.Computed<KoArray<ViewFieldRec>>;
|
||||
summarySource: ko.Computed<ColumnRec>;
|
||||
|
||||
@@ -168,6 +170,14 @@ export function createColumnRec(this: ColumnRec, docModel: DocModel): void {
|
||||
const key = `formula-assistant-history-v2-${docId}-${this.table().tableId()}-${this.colId()}`;
|
||||
return localStorageJsonObs(key, {messages: [], conversationId: uuidv4()} as ChatHistory);
|
||||
}));
|
||||
|
||||
this.cleanWidgetOptionsJson = ko.pureComputed(() => {
|
||||
const options = this.widgetOptionsJson();
|
||||
if (options && options.rules) {
|
||||
delete options.rules;
|
||||
}
|
||||
return JSON.stringify(options);
|
||||
});
|
||||
}
|
||||
|
||||
export function formatterForRec(
|
||||
|
||||
Reference in New Issue
Block a user