gristlabs_grist-core/app/client/components
Alex Hall 29dd33a45c (core) Add other direction of linking by reflist
Summary:
Allows selecting by a reflist in another table. This generalises cursor-linking with a ref column, but now it's filter linking.

Added another case to LinkingState where the source column is a reflist to the target table, filtering by the id column.

Updated convertQueryFromRefs and related functions to handle this since the id column has no column ref. In this case the string 'id' is used instead of a number.

LinkingState also checks if the source value is a reflist and uses that as the list of filter values instead of a single-element list of the cell value.

Indirect linking also works, where the source and target columns both are both references to the same table. This was the plan for a source reflist and target ref column.
I was surprised to see it also works perfectly when both columns are reflists, and it filters rows where there's an intersection!

Adding rows to the target section using the selected source record for default values is iffy. When filtering by row ID, there's no column for defaults, so the new row disappears.
For a source reflist and target ref, the first value of the reflist is the default, which is okayish. When both are reflists, the full source reflist is the default for the target column.
This seems like a bit much but just using the first value seems a bit arbitrary when there's room for all of them?

While doing all this I noticed an unrelated bug which I fixed as I was refactoring. Previously cursor linking based on a reference column did not update the cursor in the link target
when the value of the selected reference cell changed. Now cursor linking uses a floating row model like most other cases to observe the value correctly.

Test Plan: Extended SelectByRefList test and fixture, added previously failing test to RightPanelSelectBy.

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D3004
2021-08-30 17:39:15 +02:00
..
AceEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
AceEditor.js (core) Add 'value' to trigger formula autocomplete 2021-07-12 15:07:16 -07:00
AceEditorCompletions.ts (core) One more phase of ACL UI revision. 2020-12-22 22:18:12 -05:00
ActionLog.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ActionLog.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
Base.js (core) move client code to core 2020-10-02 13:24:21 -04:00
BaseView.js (core) Add other direction of linking by reflist 2021-08-30 17:39:15 +02:00
CellPosition.ts (core) Draft cells 2021-05-25 21:14:49 +02:00
ChartView.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ChartView.ts (core) Fix JS error when switching to a page containing a chart. 2021-02-25 10:50:24 -05:00
ClientScope.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
Clipboard.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Clipboard.js (core) Add support for editing on mobile. 2021-02-03 23:10:51 -05:00
CodeEditorPanel.css (core) apply access control to code view 2021-05-27 17:52:23 -04:00
CodeEditorPanel.js (core) apply access control to code view 2021-05-27 17:52:23 -04:00
ColumnFilters.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
ColumnTransform.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
Comm.ts (core) Remove a bunch of dead code 2021-07-01 18:38:21 +02:00
commandList.js (core) Freezing columns on a GridView 2021-06-18 12:22:13 +02:00
commands.css (core) move client code to core 2020-10-02 13:24:21 -04:00
commands.js (core) Improve focus and keyboard shortcuts in modals. 2020-10-03 22:56:00 -04:00
CopySelection.js (core) Simple localization support and currency selector. 2021-08-26 13:36:49 -07:00
Cursor.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
CursorMonitor.ts (core) Fixing anchor link navigation. 2021-07-23 11:02:07 +02:00
CustomView.css (core) Fix CustomView css to take full height of widget on all browsers including Safari 2020-10-06 13:18:50 -04:00
CustomView.ts (core) Initial page for custom widget 2021-08-13 23:58:25 +02:00
DetailView.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
DetailView.js (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
DocComm.ts (core) Remove a bunch of dead code 2021-07-01 18:38:21 +02:00
DocConfigTab.js (core) move client code to core 2020-10-02 13:24:21 -04:00
Drafts.ts (core) Replace time zone selector with one based on the newer autocomplete. 2021-07-23 08:02:05 -04:00
duplicatePage.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
EditorMonitor.ts (core) Readonly editors 2021-06-17 19:12:16 +02:00
EmbedForm.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FieldConfigTab.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FormulaTransform.ts (core) Automatically finalize action bundles when unrelated actions/bundles come in. 2020-11-10 10:32:07 -05:00
GridView.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
GridView.js (core) Implement UI for trigger formulas. 2021-06-29 10:24:16 -04:00
GristDoc.css (core) move client code to core 2020-10-02 13:24:21 -04:00
GristDoc.ts (core) Filter out pages for hidden views from the page list. 2021-08-27 13:51:57 -04:00
GristWSConnection.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
Importer.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
Layout.css (core) Collapse inactive view sections on mobile screens. 2021-02-09 09:17:32 -05:00
Layout.js (core) Collapse inactive view sections on mobile screens. 2021-02-09 09:17:32 -05:00
LayoutEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutPreview.css (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutPreview.js (core) move client code to core 2020-10-02 13:24:21 -04:00
LinkingState.ts (core) Add other direction of linking by reflist 2021-08-30 17:39:15 +02:00
Login.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ParseOptions.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
PluginScreen.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
Preferences.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Printing.css (core) Improve printing of tables, fix printing of charts, add a browser test. 2020-10-12 16:04:18 -04:00
Printing.ts (core) Improve printing of tables, fix printing of charts, add a browser test. 2020-10-12 16:04:18 -04:00
RecordLayout.css (core) move client code to core 2020-10-02 13:24:21 -04:00
RecordLayout.js (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
RecordLayoutEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
RefSelect.js (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00
SearchBar.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Selector.js (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
SummaryConfig.js (core) move client code to core 2020-10-02 13:24:21 -04:00
TypeConversion.ts (core) Simple localization support and currency selector. 2021-08-26 13:36:49 -07:00
TypeTransform.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
UndoStack.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
UnsavedChanges.ts (core) support ?embed=true and &style=light for a clean embed experience 2020-08-14 13:34:38 -04:00
ValidationPanel.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ValidationPanel.js (core) move client code to core 2020-10-02 13:24:21 -04:00
viewCommon.css (core) Freezing columns on a GridView 2021-06-18 12:22:13 +02:00
viewCommon.js (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewConfigTab.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewConfigTab.js (core) change filtering section of the sort&Filter side panel to match newui style 2021-05-05 15:05:13 +02:00
ViewLayout.css (core) Show sigma next to summary table titles 2021-07-12 20:10:15 -07:00
ViewLayout.ts (core) Hide filter bar for inactive widget in mobile mode 2021-08-23 10:33:44 +02:00
ViewLinker.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewPane.ts (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00