react-native-pull-to-refresh icon indicating copy to clipboard operation
react-native-pull-to-refresh copied to clipboard

use onScroll function passed in component props for iOS

Open ntorion opened this issue 5 years ago • 2 comments

Hi, I detected that onScroll function passed in props to PTRView component wasn't called only on iOS. An issue related to this problem has already been opened : https://github.com/moschan/react-native-pull-to-refresh/issues/28 This pull request fix the issue by adding the missing call.

ntorion avatar Apr 24 '19 21:04 ntorion

I think it would be better to check if not null first right? Or will that be handled elsewhere?

const { onScroll } = this.props;
if(onScroll) onScroll(e);

VicEsquivel avatar May 21 '19 23:05 VicEsquivel

yes a condition is required you're right

ntorion avatar May 27 '19 19:05 ntorion