mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Use visible column formatting when converting RefList to Text
Summary: Tweaked ReferenceListFormatter and ValueConverter to sensibly convert to Text. Fixes an embarrassing bug exposed during checkin 😱 Test Plan: Add test for converting from RefList displaying formatted dates to Text Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3254
This commit is contained in:
@@ -250,7 +250,7 @@ class ReferenceListFormatter extends ReferenceFormatter {
|
||||
// Part of this repeats the logic in BaseFormatter.formatAny which is overridden in ReferenceFormatter
|
||||
// It also ensures that complex lists (e.g. if this RefList is displaying a ChoiceList)
|
||||
// are formatted as JSON instead of CSV.
|
||||
if (!isList(value) || hasNestedObjects(value)) {
|
||||
if (!isList(value) || hasNestedObjects(decodeObject(value) as CellValue[])) {
|
||||
return formatUnknown(value);
|
||||
}
|
||||
// In the most common case, lists of simple objects like strings or dates
|
||||
|
||||
Reference in New Issue
Block a user