diff --git a/src/createGridComponent.js b/src/createGridComponent.js index 72d5c525..45a23c9b 100644 --- a/src/createGridComponent.js +++ b/src/createGridComponent.js @@ -273,7 +273,7 @@ export default function createGridComponent({ this.scrollTo({ scrollLeft: - columnIndex !== undefined + columnIndex !== undefined && columnIndex >= 0 ? getOffsetForColumnAndAlignment( this.props, columnIndex, @@ -284,7 +284,7 @@ export default function createGridComponent({ ) : scrollLeft, scrollTop: - rowIndex !== undefined + rowIndex !== undefined && rowIndex >= 0 ? getOffsetForRowAndAlignment( this.props, rowIndex,