race604 / react-native-viewpager

[Deprecated] ViewPager component for React Native
1.41k stars 373 forks source link

pass props through pageIndicator #141

Open jeongmincha opened 7 years ago

jeongmincha commented 7 years ago

After I looked at your codes deeply, it don't provide a feature to pass props to customized page indicator. When I want to pass props to customized page, I can write as:

renderPage={(data:Object, pageID: number | string,)=>{
  return (...)
}}

However, renderPageIndicator method don't any parameter.

renderPageIndicator={()=>{
  return (...)
}}

In your codes, renderPage method will take arguments by using this.props.renderPage.bind(...) but renderPageIndicator don't use bind() anywhere. That's why we can't pass props through renderPageIndicator method.

I think it should be implemented.