mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Refactor more value parsing code into common
Summary: Following discussion in https://phab.getgrist.com/D3164: - Change createParser to accept docData and one or two metadata row IDs and let it extract the metadata, so it's more easily usable in the server. - Change ViewFieldRec.valueParser observable to a function createValueParser. Test Plan: Existing tests. Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3172
This commit is contained in:
@@ -17,9 +17,6 @@ export class ReferenceUtils {
|
||||
public readonly isRefList: boolean;
|
||||
|
||||
constructor(public readonly field: ViewFieldRec, docData: DocData) {
|
||||
// Note that this constructor is called inside ViewFieldRec.valueParser, a ko.pureComputed,
|
||||
// and there are several observables here which get used and become dependencies.
|
||||
|
||||
const colType = field.column().type();
|
||||
const refTableId = getReferencedTableId(colType);
|
||||
if (!refTableId) {
|
||||
|
||||
Reference in New Issue
Block a user