Skip to content

Commit b16f419

Browse files
committed
Replaced top/left positioning in Grid with transform: translate. It seems to result in slightly smoother scrolling performance in Chrome.
1 parent 25b7c79 commit b16f419

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/Grid/Grid.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,7 @@ export default class Grid extends Component {
393393
key={`row:${rowIndex}, column:${columnIndex}`}
394394
className='Grid__cell'
395395
style={{
396-
left: columnDatum.offset,
397-
top: rowDatum.offset,
396+
transform: `translate(${columnDatum.offset}px, ${rowDatum.offset}px)`,
398397
height: this._getRowHeight(rowIndex),
399398
width: this._getColumnWidth(columnIndex)
400399
}}

0 commit comments

Comments
 (0)