gristlabs_grist-core/app/common
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
..
ACLPermissions.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
ACLRuleCollection.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
ActionBundle.ts (core) discount indirect changes for access control purposes 2021-05-12 11:26:21 -04:00
ActionDispatcher.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
ActionGroup.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
ActionRouter.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
ActionSummary.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
ActiveDocAPI.ts (core) Linking summary tables grouped by list columns 2021-08-10 20:41:24 +02:00
ApiError.ts (core) give more detailed reasons for access denied when memos are present 2021-02-15 17:02:24 -05:00
arrayToString.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
AsyncCreate.ts (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00
AsyncFlow.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
BaseAPI.ts (core) give more detailed reasons for access denied when memos are present 2021-02-15 17:02:24 -05:00
BasketClientAPI.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
BigInt.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
BillingAPI.ts (core) link AppSumo activations with stripe, and support upgrades/downgrades 2021-06-24 10:18:42 -04:00
BinaryIndexedTree.js (core) move client code to core 2020-10-02 13:24:21 -04:00
BrowserSettings.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
ColumnFilterFunc.ts (core) Use individual choices for filtering choice lists 2021-06-11 09:34:06 -07:00
ColumnGetters.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
csvFormat.ts (core) Add our very own implementation of tokenfield (aka pillbox, tag list) 2021-05-03 17:16:24 -04:00
declarations.d.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
delay.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
DisposableWithEvents.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
DocActions.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
DocData.ts (core) implement cleaner row-level access control for outgoing messages 2020-11-30 16:28:33 -05:00
DocListAPI.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
DocSnapshot.ts (core) revamp snapshot inventory 2020-10-30 13:52:46 -04:00
emails.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
EncActionBundle.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
ErrorWithCode.ts (core) give more detailed reasons for access denied when memos are present 2021-02-15 17:02:24 -05:00
Features.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
FilterState.ts (core) Download as CSV button on sections 2021-05-27 15:48:12 +02:00
Formula.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
GranularAccessClause.ts (core) Add 'user' variable to trigger formulas 2021-07-15 15:18:32 -07:00
GristServerAPI.ts (core) Remove a bunch of dead code 2021-07-01 18:38:21 +02:00
gristTypes.ts (core) Barely working reference lists in frontend 2021-07-23 18:41:44 +02:00
gristUrls.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
gutil.ts (core) Fixing anchor link navigation. 2021-07-23 11:02:07 +02:00
InactivityTimer.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
KeyedMutex.ts (core) fix sync to s3 when doc is marked as dirty but proves to be clean 2020-11-10 08:12:31 -05:00
KeyedOps.ts (core) start reconciling forking with granular access 2021-01-12 14:08:49 -05:00
LoginSessionAPI.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
LoginState.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
marshal.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
MemBuffer.js (core) move home server into core 2020-07-21 20:39:10 -04:00
NumberFormat.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
orgNameUtils.ts (core) Add some more special subdomains, not to be used for team sites 2021-07-12 09:51:20 -04:00
parseDate.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
plugin.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
PluginInstance.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
Prefs.ts (core) Enable auto triggering of Welcome Tour, and various improvements. 2021-07-30 14:17:54 -04:00
RefCountMap.ts (core) Fix an insidious bug in RefCountMap, manifesting as JS errors some time after import. 2020-11-06 09:24:56 -05:00
resetOrg.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
roles.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
RowFilterFunc.ts (core) Download as CSV button on sections 2021-05-27 15:48:12 +02:00
schema.ts (core) Implement UI for trigger formulas. 2021-06-29 10:24:16 -04:00
sharing.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
SortFunc.ts (core) Use unicode-aware comparisons for user-visible strings. 2021-03-15 09:54:10 -04:00
StringUnion.ts (core) Implement updated DocMenu UI: list/card mode and sort mode. 2020-08-19 11:31:42 -04:00
TableData.ts (core) hide long sequences of unchanged rows in diffs 2020-11-19 18:19:54 -05:00
TabularDiff.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
tbind.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
TestState.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
timeFormat.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
tpromisified.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
tsconfig.json (core) more grist-core cleanup 2020-07-23 16:21:08 -04:00
tsvFormat.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
uploads.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
urlUtils.ts (core) remove metrics 2020-09-29 18:57:56 -04:00
UserAPI.ts (core) Redesign examples and templates UI 2021-07-28 12:29:03 -07:00
UserConfig.ts (core) Remove REPL code 2021-07-20 15:17:03 +02:00
ValueFormatter.ts (core) make ValueFormatter.format honor its return type 2020-11-12 15:19:38 -05:00