mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
7f1f8fc9e6
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 |
||
---|---|---|
.. | ||
entities | ||
AppModel.ts | ||
BaseRowModel.js | ||
BillingModel.ts | ||
ClientColumnGetters.ts | ||
ColumnACIndexes.ts | ||
ColumnCache.ts | ||
ColumnFilter.ts | ||
ColumnFilterMenuModel.ts | ||
ConnectState.ts | ||
DataRowModel.ts | ||
DataTableModel.js | ||
DataTableModelWithDiff.ts | ||
DocData.ts | ||
DocModel.ts | ||
DocPageModel.ts | ||
errors.ts | ||
gristConfigCache.ts | ||
gristUrlState.ts | ||
HomeModel.ts | ||
MetaRowModel.js | ||
MetaTableModel.js | ||
modelUtil.js | ||
NotifyModel.ts | ||
QuerySet.ts | ||
rowset.ts | ||
rowuid.js | ||
SearchModel.ts | ||
SectionFilter.ts | ||
TableData.ts | ||
TableModel.js | ||
TreeModel.ts | ||
UserManagerModel.ts | ||
UserPrefs.ts | ||
WorkspaceInfo.ts |