diff options
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/TableBox.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/components/TableBox.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx index b88389de6..3685a198e 100644 --- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx +++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx @@ -82,7 +82,7 @@ export class TableBox extends React.Component<TableBoxProps> { return (this.viewScale * this._tableHeight) / this._tableDataIds.length; } @computed get startID() { - return this.rowHeight ? Math.floor(this._scrollTop / this.rowHeight) : 0; + return this.rowHeight ? Math.max(Math.floor(this._scrollTop / this.rowHeight)-1, 0) : 0; } @computed get endID() { return Math.ceil(this.startID + (this._tableContainerHeight * this.viewScale) / (this.rowHeight || 1)); @@ -163,6 +163,7 @@ export class TableBox extends React.Component<TableBoxProps> { return ( <div className="tableBox" + style={{width: this.props.width+this.props.margin.right}} tabIndex={0} onKeyDown={e => { if (this.props.layoutDoc && e.key === 'a' && (e.ctrlKey || e.metaKey)) { |