gristlabs_grist-core/app/client
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
..
aclui (core) tweak description of FullCopies special permission 2021-07-30 06:18:41 -04:00
components (core) Linking summary tables grouped by list columns 2021-08-10 20:41:24 +02:00
lib (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
models (core) Linking summary tables grouped by list columns 2021-08-10 20:41:24 +02:00
ui (core) Disabling plugin import sources menu options when import is disabled 2021-08-09 16:54:12 +02:00
ui2018 (core) Hide workspace in breadcrumbs if doc is unsaved 2021-08-05 15:57:03 -07:00
widgets (core) Allow creating custom document tours with a special table 2021-07-23 20:23:30 +02:00
app.css (core) Make mobile the default mode. 2021-02-25 11:31:43 -05:00
app.js (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
declarations.d.ts (core) Remove REPL code 2021-07-20 15:17:03 +02:00
exposeModulesForTests.js (core) Some cleanup: remove old unused modules. 2020-11-20 11:23:20 -05:00
logo.css (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
tsconfig.json freshen app/client/ui2018/cssVars.ts 2020-06-23 16:16:38 -04:00