diff --git a/src/components/base/GrowScroll/index.js b/src/components/base/GrowScroll/index.js index 6992eb3e..0c4523ec 100644 --- a/src/components/base/GrowScroll/index.js +++ b/src/components/base/GrowScroll/index.js @@ -34,11 +34,15 @@ class GrowScroll extends PureComponent { const minY = offsetLimit.y.min if (offset.y > maxY) { - this.scrollTo(offset.x, maxY) + this.setPosition(offset.x, maxY, { + withoutCallbacks: true, + }) } if (offset.y < minY) { - this.scrollTo(offset.x, minY) + this.setPosition(offset.x, minY, { + withoutCallbacks: true, + }) } } }) diff --git a/src/components/base/GrowScroll/stories.js b/src/components/base/GrowScroll/stories.js index d4d9dad2..f921a736 100644 --- a/src/components/base/GrowScroll/stories.js +++ b/src/components/base/GrowScroll/stories.js @@ -7,7 +7,9 @@ import GrowScroll from 'components/base/GrowScroll' const stories = storiesOf('GrowScroll', module) stories.add('basic', () => ( - - {[...Array(1000).keys()].map(v =>
{v}
)}
+ + + {[...Array(1000).keys()].map(v =>
{v}
)} +
))