gristlabs_grist-core/app/client/models
Alex Hall 7f1f8fc9e6 (core) Linking summary tables grouped by list columns
Summary:
Prefix keys of `LinkingState.filterColValues` with `_contains:` when the source column is a ChoiceList or ReferenceList.

This is parsed out to make a boolean `isContainsFilter` which is kept in each value of `QueryRefs.filterTuples` (previously `filterPairs`).

Then when converting back in `convertQueryFromRefs` we construct `Query.contains: {[colId: string]: boolean}`.

Finally `getFilterFunc` uses `Query.contains` to decide what kind of filtering to do.

This is not pretty, but the existing code is already very complex and it was hard to find something that wouldn't require touching loads of code just to make things compile.

Test Plan: Added a new nbrowser test and fixture, tests that selecting a source table by summary tables grouped by a choicelist column, non-list column, and both all filter the correct data.

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2940
2021-08-10 20:41:24 +02:00
..
entities (core) Barely working reference lists in frontend 2021-07-23 18:41:44 +02:00
AppModel.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
BaseRowModel.js (core) Update ACL resources/rules when tables/columns get renamed 2021-01-04 22:03:01 -05:00
BillingModel.ts (core) Fix several flaky tests. 2021-07-19 11:47:14 -04:00
ClientColumnGetters.ts (core) hide long sequences of unchanged rows in diffs 2020-11-19 18:19:54 -05:00
ColumnACIndexes.ts (core) Show count of formula errors in the column config in the right-side panel. 2021-04-20 21:26:17 -04:00
ColumnCache.ts (core) Show count of formula errors in the column config in the right-side panel. 2021-04-20 21:26:17 -04:00
ColumnFilter.ts (core) Makes filter counts take other column filters into account 2021-06-23 09:01:41 +02:00
ColumnFilterMenuModel.ts (core) Makes filter counts take other column filters into account 2021-06-23 09:01:41 +02:00
ConnectState.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
DataRowModel.ts (core) Fix JS error when scrolling with a column of hyperlinks, and use stricter types. 2021-05-12 17:31:56 -04:00
DataTableModel.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DataTableModelWithDiff.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
DocData.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
DocModel.ts (core) Remove REPL code 2021-07-20 15:17:03 +02:00
DocPageModel.ts (core) Disabling 'Add widget to page' for special pages 2021-08-09 14:49:19 +02:00
errors.ts (core) granular access control in the presence of schema changes 2021-03-01 13:49:31 -05:00
gristConfigCache.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
gristUrlState.ts (core) Redesign examples and templates UI 2021-07-28 12:29:03 -07:00
HomeModel.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
MetaRowModel.js (core) move client code to core 2020-10-02 13:24:21 -04:00
MetaTableModel.js (core) move client code to core 2020-10-02 13:24:21 -04:00
modelUtil.js (core) move client code to core 2020-10-02 13:24:21 -04:00
NotifyModel.ts (core) suspend a team site after an AppSumo refund 2021-07-15 09:14:12 -04:00
QuerySet.ts (core) Linking summary tables grouped by list columns 2021-08-10 20:41:24 +02:00
rowset.ts (core) Download as CSV button on sections 2021-05-27 15:48:12 +02:00
rowuid.js (core) move client code to core 2020-10-02 13:24:21 -04:00
SearchModel.ts (core) Prevents running simultaneous search in parallel inadvertendly 2021-05-28 15:48:21 +02:00
SectionFilter.ts (core) Makes filter counts take other column filters into account 2021-06-23 09:01:41 +02:00
TableData.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
TableModel.js (core) Change how formula columns can be converted to data. 2021-03-05 12:42:57 -05:00
TreeModel.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
UserManagerModel.ts (core) Disallow the combination of Public Edit access and granular ACLs. 2021-03-26 09:59:41 -04:00
UserPrefs.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
WorkspaceInfo.ts (core) move client code to core 2020-10-02 13:24:21 -04:00