-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
I think that the datasource cloning needs to move into componentWillReceiveProps so this.pageCount will be updated before the first scrollToPage-call.
But it seems that height and width are needed before cloning (why?). Width and height are achieved at onLayout() which I believe happens after receiveProps.
Here is the problem:
https://github.com/ldn0x7dc/react-native-view-pager/blob/master/library/ViewPager.js#L248
validPage() resets page to 0 because pageCount is 0 at this stage.
This problem affects Gallery as well:
ldn0x7dc/react-native-gallery#18
shercoder
Metadata
Metadata
Assignees
Labels
No labels