scrollToPage doesn't work when animated = false. That happens because of this:
requestAnimationFrame(() => {
this.scrollToPage(Math.floor(this.progress), false);
});
After scrollToPage it calls scrollToPage second time and goes back to 0 page.
Quick hack to override this issue (hopefully we can see a fix next version and we don't need this dirty hack):
//Set scrollState to 1 before scrolling
pager.current.scrollState = 1;
pager.current.scrollToPage(0, false)
//Make scrollState to 0 zero after scroll will finish
setTimeout(() => {
pager.current.scrollState = 0
}, 100)
Thanks!!!
scrollToPage doesn't work when animated = false. That happens because of this:
After scrollToPage it calls scrollToPage second time and goes back to 0 page.
Quick hack to override this issue (hopefully we can see a fix next version and we don't need this dirty hack):
Thanks!!!