dancormier / react-native-swipeout

iOS-style swipeout buttons behind component
MIT License
2.62k stars 649 forks source link

onPress事件在FlatList加载完之后立刻执行,不应该是在按下按钮的时候吗? #277

Closed cyixlq closed 6 years ago

cyixlq commented 6 years ago

我用swipeout组件嵌套在列表项最外层,当FlatList列表加载完成的时候,右侧隐藏按钮立刻执行了所有的onPress事件,如图: MusicItem Component App.js console log

cyixlq commented 6 years ago

OK, I know. It's settled.

thtTNT commented 6 years ago

You can't write like this. You should write like this: onPress={() => method()}

cyixlq commented 6 years ago

Thank you very much!