gristlabs_grist-core/app/server
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
..
lib (core) Linking summary tables grouped by list columns 2021-08-10 20:41:24 +02:00
declarations.d.ts (core) start applying defenses for untrusted document uploads 2021-07-14 18:34:27 -04:00
devServerMain.ts (core) Adding google drive plugin as a fallback for url plugin 2021-08-04 17:59:13 +02:00
mergedServerMain.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
serverMethods.ts (core) support python3 in grist-core, and running engine via docker and/or gvisor 2021-07-28 09:02:32 -04:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00