Open luatnd opened 5 years ago
Hi, thanks for your pull request.
I tried to reproduce the case, but i didn't get it work like explained. When i initialize a dataSource and then update it, the Viewpager can be scrolled as expected:
// what i tried:
export default class PseudoComponent extends PureComponent {
constructor() {
this.state = {
dataSource: [{ ... }]
}
}
update = () => {
this.setState({
dataSource: [{...}, {...}, {...}]
}
}
render() {
return (
<ViewPager
...
data={this.state.dataSource}
/>
)
}
}
What other properties do you provide to the ViewPager
Component?
Could be that there is an unwanted interaction between single properties.
Reproduce step First, init the viewpager with only 1 item:
Then, after fetching items from API, bind new items:
Actual result Can not swipe between pages.
Expected result Can swipe.
Debuging As I can see:
So,
_getScrollEnabled
function will return false As a result, ScrollView > scrollEnabled was disabled: