mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Cleanup old frontend code for handling empty summary groups
Summary: The removed TODO was resolved in https://phab.getgrist.com/D3489 Test Plan: Existing tests Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D4006
This commit is contained in:
parent
fe846d3068
commit
999d723d14
@ -61,17 +61,7 @@ function BaseView(gristDoc, viewSectionModel, options) {
|
||||
// We use a DynamicQuerySet as the underlying RowSource, with ColumnFilters applies on top of
|
||||
// it. It filters based on section linking, re-querying as needed in case of onDemand tables.
|
||||
this._queryRowSource = DynamicQuerySet.create(this, gristDoc.querySetManager, this.tableModel);
|
||||
|
||||
// When we have a summary table, filter out rows corresponding to empty groups.
|
||||
// (TODO this may be better implemented by deleting empty groups in the data engine.)
|
||||
if (this.viewSection.table().summarySourceTable()) {
|
||||
const groupGetter = this.tableModel.tableData.getRowPropFunc('group');
|
||||
this._mainRowSource = rowset.BaseFilteredRowSource.create(this,
|
||||
rowId => !groupGetter || !gristTypes.isEmptyList(groupGetter(rowId)));
|
||||
this._mainRowSource.subscribeTo(this._queryRowSource);
|
||||
} else {
|
||||
this._mainRowSource = this._queryRowSource;
|
||||
}
|
||||
this._mainRowSource = this._queryRowSource;
|
||||
|
||||
if (this.comparison) {
|
||||
// Assign extra row ids for any rows added in the remote (right) table or removed in the
|
||||
|
Loading…
Reference in New Issue
Block a user