gristlabs_grist-core/app
Alex Hall f110ffdafd (core) Follow chain of same-record links for getDefaultColValues
Summary:
When two widgets are linked by same-record linking, and the source of that link is also filter-linked, then it will pick up default values from its own filter-link source, but the same-record-link target didn't. This fixes that so that default values are filled in intuitively.

Moved the logic of linkingState, linkingFilter, and getDefaultColValues from BaseView.js to LinkingState.ts and ViewSectionRec.ts. In particular getDefaultColValues is now a property of LinkingState which may be copied from the source view section for a same-record link.

Note that `ViewSectionRec.linkingFilter` no longer uses `computerBuilder` and thus doesn't ignore dependencies inside LinkingState any more. I couldn't figure out how to make `linkingFilter` a `pureComputed` (otherwise I get recursion errors) that ignores dependencies. In any case, it's now important to have a dependency on `srcSection.linkingState()` for `getDefaultColValues` to work correctly, so I think this is for the best.

Test Plan: Added a new nbrowser test and fixture.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3238
2022-02-03 18:51:02 +02:00
..
client (core) Follow chain of same-record links for getDefaultColValues 2022-02-03 18:51:02 +02:00
common (core) Follow chain of same-record links for getDefaultColValues 2022-02-03 18:51:02 +02:00
gen-server (core) move more tests to grist-core 2021-12-10 18:33:07 -05:00
plugin (core) Widget options api 2022-01-13 11:10:17 +01:00
server (core) Create an extra raw data widget when creating a table 2022-02-01 21:19:30 +02:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00