mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fix JS error when scrolling with a column of hyperlinks, and use stricter types.
Summary: When scrolling quicly through a column with hyperlinks, null could be passed to a function that didn't expect it. Added better types would help catch it. Test Plan: Tested manually Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2813
This commit is contained in:
@@ -5,7 +5,7 @@ import * as DataTableModel from 'app/client/models/DataTableModel';
|
||||
import { IRowModel } from 'app/client/models/DocModel';
|
||||
import { ValidationRec } from 'app/client/models/entities/ValidationRec';
|
||||
import * as modelUtil from 'app/client/models/modelUtil';
|
||||
import { ColValues } from 'app/common/DocActions';
|
||||
import { CellValue, ColValues } from 'app/common/DocActions';
|
||||
import * as ko from 'knockout';
|
||||
|
||||
/**
|
||||
@@ -16,7 +16,7 @@ export class DataRowModel extends BaseRowModel {
|
||||
// Instances of this class are indexable, but that is a little awkward to type.
|
||||
// The cells field gives typed access to that aspect of the instance. This is a
|
||||
// bit hacky, and should be cleaned up when BaseRowModel is ported to typescript.
|
||||
public readonly cells: {[key: string]: modelUtil.KoSaveableObservable<any>} = this as any;
|
||||
public readonly cells: {[key: string]: modelUtil.KoSaveableObservable<CellValue>} = this as any;
|
||||
|
||||
public _validationFailures: ko.PureComputed<Array<IRowModel<'_grist_Validations'>>>;
|
||||
public _isAddRow: ko.Observable<boolean>;
|
||||
|
||||
Reference in New Issue
Block a user