n4kz / react-native-pages

Easy to use page view component
Other
376 stars 83 forks source link

Feature/pagination #42

Closed pratikgode closed 4 years ago

pratikgode commented 4 years ago

For pagination onLastPageReached callback has added. It works for both horizontal and vertical pages.

<Pages
   horizontal={false}
   ref={o => this.pages = o}
   onLastPageReached={() => {
      console.log("Last page reached!!")
   }}>
       <View style={{ flex: 1, backgroundColor: 'orange' }} />
       <View style={{ flex: 1, backgroundColor: 'white' }} />
       <View style={{ flex: 1, backgroundColor: 'green' }} />
</Pages>