Skip to content

Commit 642d3ae

Browse files
author
Ives van Hoorne
committed
Fix janking of dashboard view on scroll
1 parent a921771 commit 642d3ae

File tree

2 files changed

+7
-2
lines changed
  • packages/app/src/app/pages/Dashboard/Content

2 files changed

+7
-2
lines changed

packages/app/src/app/pages/Dashboard/Content/SandboxCard/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ class SandboxItem extends React.PureComponent<Props> {
100100

101101
componentDidMount() {
102102
if (this.props.selected) {
103-
if (this.el && typeof this.el.focus === 'function') {
103+
if (
104+
this.el &&
105+
typeof this.el.focus === 'function' &&
106+
!this.props.isScrolling
107+
) {
104108
this.el.focus();
105109
}
106110
}

packages/app/src/app/pages/Dashboard/Content/SandboxGrid/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class SandboxGrid extends React.Component<*, State> {
193193
}
194194
};
195195

196-
cellRenderer = ({ rowIndex, columnIndex, key, style }) => {
196+
cellRenderer = ({ rowIndex, columnIndex, key, style, isScrolling }) => {
197197
let index = rowIndex * this.columnCount + columnIndex;
198198
const { sandboxes, signals } = this.props;
199199

@@ -238,6 +238,7 @@ class SandboxGrid extends React.Component<*, State> {
238238

239239
return (
240240
<SandboxItem
241+
isScrolling={isScrolling}
241242
id={item.id}
242243
title={item.title || item.id}
243244
details={editedSince}

0 commit comments

Comments
 (0)