gristlabs_grist-core/app/client/widgets
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
..
AbstractWidget.js (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
AttachmentsEditor.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
AttachmentsWidget.ts (core) Polish new Add Column menu 2023-10-17 15:39:53 -04:00
BaseEditor.js Correct spelling mistakes 2022-02-19 09:46:49 +00:00
CellStyle.ts (core) Enable the 'none' option in ColorSelect for cell and header text styles 2023-12-04 19:13:52 -05:00
CheckBox.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
CheckBoxEditor.js (core) Add shortcut for opening Record Card 2023-12-08 11:32:45 -05:00
ChoiceEditor.js (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ChoiceListCell.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ChoiceListEditor.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ChoiceListEntry.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ChoiceTextBox.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ChoiceToken.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ConditionalStyle.ts (core) Floating formula editor 2023-06-02 17:59:22 +02:00
CurrencyPicker.ts trad: make the widgets and the Welcome Tour translatable 2023-01-24 13:47:09 +01:00
DateEditor.js (core) Fix one day shift in datepicker for DateTime column [WIP] 2023-02-15 14:54:33 +01:00
DateTextBox.js Fixes bug 'this.valueFormatter is not a function' (#632) 2023-08-22 03:17:01 -04:00
DateTimeEditor.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
DateTimeEditor.js (core) Change datepicker in DateEditor to use moment format, show AltText in DateEditor 2021-12-07 11:33:49 -05:00
DateTimeTextBox.js (core) Multi-column configuration 2022-10-17 09:51:19 +02:00
DiffBox.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
DiscussionEditor.ts (core) Adding description icon and tooltip in the GridView 2023-04-20 18:21:31 +02:00
EditorButtons.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
EditorPlacement.ts (core) Fix sizing of tracebacks in formula errors, to make it scrollable 2022-07-21 09:56:52 -04:00
EditorTooltip.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ErrorDom.ts (core) Allow adding rows to widgets filtered by a link using a formula column 2023-12-18 20:28:41 +02:00
FieldBuilder.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
FieldBuilder.ts (core) Allow adding rows to widgets filtered by a link using a formula column 2023-12-18 20:28:41 +02:00
FieldEditor.ts (core) Add shortcut for opening Record Card 2023-12-08 11:32:45 -05:00
FloatingEditor.ts (core) Implement AI Assistant UI V2 2023-07-13 10:30:35 -04:00
FormulaAssistant.ts (core) Add new telemetry events 2023-11-01 10:49:33 -04:00
FormulaEditor.ts (core) allow copying errors from regular cell editor 2023-08-17 09:35:22 -04:00
HyperLinkEditor.ts trad: make the widgets and the Welcome Tour translatable 2023-01-24 13:47:09 +01:00
HyperLinkTextBox.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
NewAbstractWidget.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
NewBaseEditor.ts (core) Add shortcut for opening Record Card 2023-12-08 11:32:45 -05:00
NTextBox.ts Fixes bug 'this.valueFormatter is not a function' (#632) 2023-08-22 03:17:01 -04:00
NTextEditor.ts (core) Floating formula editor 2023-06-02 17:59:22 +02:00
NumericTextBox.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
Reference.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Reference.ts (core) Enable Record Cards 2023-11-21 16:49:41 -05:00
ReferenceEditor.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ReferenceList.ts (core) Add shortcut for opening Record Card 2023-12-08 11:32:45 -05:00
ReferenceListEditor.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
Spinner.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Spinner.ts (core) Simple localization support and currency selector. 2021-08-26 13:36:49 -07:00
Switch.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
TextBox.css (core) Polish new Add Column menu 2023-10-17 15:39:53 -04:00
TextEditor.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
TextEditor.js Visually identify that a field is a drop-down list (single choice) #491 (#525) 2023-06-13 13:14:01 -04:00
Toggle.ts (core) Add shortcut for opening Record Card 2023-12-08 11:32:45 -05:00
TZAutocomplete.ts (core) Improving experience when editing group-by column. 2022-01-18 14:31:31 +01:00
UserType.ts trad: make the widgets and the Welcome Tour translatable 2023-01-24 13:47:09 +01:00
UserTypeImpl.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