...
|
...
|
@@ -367,14 +367,15 @@ export default class NewArrival extends Component { |
|
|
}}
|
|
|
scrollEventThrottle={300}
|
|
|
initialListSize={40}
|
|
|
onScroll={(event) => {
|
|
|
if (this.state.showBackToTopButton && event.nativeEvent.contentOffset.y < height) {
|
|
|
this.setState({showBackToTopButton: false});
|
|
|
}
|
|
|
if (this.state.showBackToTopButton == false && event.nativeEvent.contentOffset.y > height) {
|
|
|
this.setState({showBackToTopButton: true});
|
|
|
}
|
|
|
}}
|
|
|
|
|
|
onScrollEndDrag={(event) => {
|
|
|
if (this.state.showBackToTopButton && event.nativeEvent.contentOffset.y < height) {
|
|
|
this.setState({showBackToTopButton: false});
|
|
|
}
|
|
|
if (this.state.showBackToTopButton == false && event.nativeEvent.contentOffset.y > height) {
|
|
|
this.setState({showBackToTopButton: true});
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
{productList.isFilter ?
|
|
|
<NewArrivalCategoryList
|
...
|
...
|
@@ -400,6 +401,7 @@ export default class NewArrival extends Component { |
|
|
style={styles.backToTopButton}
|
|
|
onPress={()=>{
|
|
|
this.listView && this.listView.scrollTo({x: 0, y: 0, animated: true});
|
|
|
this.setState({showBackToTopButton: false});
|
|
|
}}>
|
|
|
<Image style={{flex:1}} source={require('../../image/backtop.png')}/>
|
|
|
</TouchableOpacity>: null
|
...
|
...
|
|