gristlabs_grist-core/app/client/models/entities
Alex Hall c470c4041b (core) Use visibleCol instead of displayCol with createFormatter
Summary:
Some things (like rendering cells) use the `visibleCol` for `createFormatter`, while other things (like `CopySelection`) used the `displayCol`. For references, the display column has type Any and doesn't know about the original formatting. This resulted in formatting being lost when copying from reference columns even though formatting was preserved when copying from the original (visible) column which looked identical. This diff fixes this and ensures that `createFormatter` is always used with the `visibleCol`. This was agreed on in https://grist.slack.com/archives/C0234CPPXPA/p1639571321043000

Additionally:

- Replaces the functions `createVisibleColFormatter` computed properties `visibleColFormatter` as suggested by a `TODO`.
- Extracts common code from `createVisibleColFormatter` in `ColumnRec` and `ViewFieldRec`

Test Plan: Fixed a test in CopyPaste which displayed the previous inconsistent behaviour.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3189
2021-12-16 22:19:36 +02:00
..
ACLRuleRec.ts (core) make AccessRules and FullCopies effective 2021-03-25 15:05:26 -04:00
ColumnRec.ts (core) Use visibleCol instead of displayCol with createFormatter 2021-12-16 22:19:36 +02:00
DocInfoRec.ts (core) Filter out pages for hidden views from the page list. 2021-08-27 13:51:57 -04:00
FilterRec.ts (core) Allow filtering hidden columns 2021-11-22 10:26:08 -08:00
PageRec.ts (core) Filter out pages for hidden views from the page list. 2021-08-27 13:51:57 -04:00
TabBarRec.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
TableRec.ts (core) Remove code related to _grist_TableViews 2021-11-30 23:51:30 +02:00
ValidationRec.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewFieldRec.ts (core) Use visibleCol instead of displayCol with createFormatter 2021-12-16 22:19:36 +02:00
ViewRec.ts (core) Remove code related to _grist_TableViews 2021-11-30 23:51:30 +02:00
ViewSectionRec.ts (core) Exposing custom widgets on the UI 2021-12-01 18:21:06 +01:00