gristlabs_grist-core/app/client/models
Alex Hall bd52665f96 (core) Allow adding rows to widgets filtered by a link using a formula column
Summary:
When a widget `A` is selected by a widget `B` so that `A` is filtered, adding a new row to `A` uses the values in the selected row of `B` and the columns relevant to the linking as default values for the new row. This ensures that the new row matches the current linking filter and remains visible. However this would previously cause a sandbox error when one of the linking columns was a formula column, which doesn't allow setting values. This diff ignores formula columns when picking default values.

Since the value of the formula column in the new row typically won't match the linking filter, extra measures are needed to avoid the new row immediately disappearing. Regular filters already have a mechanism for this, but I didn't manage to extend it to also work for linking. Thanks @dsagal for creating `UnionRowSource` (originally in D4017) which is now used as the solution for temporarily exempting rows from both kinds of filtering.

While testing, I also came across another bug in linking summary tables that caused incorrect filtering, which I fixed with some changes to `DynamicQuerySet`.

Test Plan: Extended an nbrowser test, which both tests for the main change as well as the secondary bugfix.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D4135
2023-12-18 20:28:41 +02:00
..
entities (core) Record Cards 2023-11-19 20:12:37 -05:00
AppModel.ts Allow URLs with only a docID #768 (#771) 2023-11-29 15:13:29 -05:00
BaseRowModel.js (core) Update ACL resources/rules when tables/columns get renamed 2021-01-04 22:03:01 -05:00
ClientColumnGetters.ts (core) Filter rows based on linked widgets when exporting view 2023-07-26 21:49:52 +02:00
ColumnACIndexes.ts Rename text cleaning function to "normalizeText" 2022-08-17 19:11:52 +02: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) Fix date filter for DateTime columns. 2023-01-18 10:18:15 +01:00
ColumnFilterMenuModel.ts (core) Add behavioral and coaching call popups 2022-12-20 09:49:41 -05:00
ColumnToMap.ts (core) Extending widget 2023-10-09 14:53:20 +02:00
ConnectState.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
DataRowModel.ts (core) When a checkbox is clicked on a new record, set default values determined by linking 2022-11-10 14:34:40 -05:00
DataTableModel.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DataTableModelWithDiff.ts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
DocData.ts (core) forward more kinds of edits to a virtual table 2023-06-26 12:05:34 -04:00
DocModel.ts (core) Polish new Add Column menu 2023-10-17 15:39:53 -04:00
DocPageModel.ts (core) Add new telemetry events 2023-11-01 10:49:33 -04:00
errors.ts (core) Avoid reporting unhelpful ResizeObserver error 2023-10-27 15:26:20 -04:00
features.ts (core) Enable Record Cards 2023-11-21 16:49:41 -05:00
gristConfigCache.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
gristUrlState.ts (core) Treating API urls as external in cells 2023-10-24 08:55:08 +02:00
HomeModel.ts (core) Move theme from ConfigNotifier to ThemeNotifier 2023-10-10 21:45:10 -04:00
MetaRowModel.js (core) move client code to core 2020-10-02 13:24:21 -04:00
MetaTableModel.js (core) Raw renames 2022-04-27 22:21:55 +02:00
modelUtil.js (core) move client code to core 2020-10-02 13:24:21 -04:00
NotifyModel.ts (core) deleting queue from single webhook 2023-07-18 11:46:10 +02:00
QuerySet.ts (core) Allow adding rows to widgets filtered by a link using a formula column 2023-12-18 20:28:41 +02:00
rowset.ts (core) Allow adding rows to widgets filtered by a link using a formula column 2023-12-18 20:28:41 +02:00
rowuid.js (core) move client code to core 2020-10-02 13:24:21 -04:00
RuleOwner.ts (core) Improve highlighting of previewed formula 2023-07-20 14:34:22 -04:00
SearchModel.ts (core) Cursor in custom widgets 2023-08-29 09:19:52 +02:00
SectionFilter.ts (core) Allow adding rows to widgets filtered by a link using a formula column 2023-12-18 20:28:41 +02:00
Styles.ts Header colored (#581) 2023-08-07 11:01:35 -07:00
TableData.ts (core) Use MetaTableData more 2021-12-07 17:09:58 +02:00
TableModel.js (core) Change how formula columns can be converted to data. 2021-03-05 12:42:57 -05:00
TelemetryModel.ts (core) Add Support Grist page and nudge 2023-07-04 17:36:59 -04:00
TreeModel.ts (core) Revealing hidden pages with visible children. 2022-10-31 14:02:38 +01:00
UnionRowSource.ts (core) Allow adding rows to widgets filtered by a link using a formula column 2023-12-18 20:28:41 +02:00
UserManagerModel.ts (core) User language switcher 2023-01-26 09:47:14 +01:00
UserPrefs.ts (core) Improve dark mode 2023-04-12 01:58:48 -04:00
ViewFieldConfig.ts Header colored (#581) 2023-08-07 11:01:35 -07:00
VirtualTable.ts (core) Adds a UI panel for managing webhooks 2023-05-08 18:25:27 -04:00
WorkspaceInfo.ts (core) move client code to core 2020-10-02 13:24:21 -04:00