souporserious/react-view-pager

workarounds for contain={true} and onScroll progress?

Open

#49 opened on Jan 1, 2017

View on GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (46 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (294 stars)
PR merge metrics
 (PR metrics pending)

Description

happy new year!

when contain is set to {true}, onScroll's final progress is less than expected since views no longer scroll to the very possible end...

image #1 shows that when fully scrolling to the end with contain = {false}, progress works as expected... this is when there are 7 views and viewsToShow={6}

image #2 illustrates the problem well - "Ander..." is the last view, the pager is fully scrolled, but progress remains in the 30% range because contain = {true}

before i go and see if i can hack together a math solution to the problem, is there a code-based solution that is recommended for this?

Contributor guide