onLongPress is not working
See original GitHub issueEnvironment
react: 16.9.0 react-native: 0.61.2 react-native-paper: ^2.16.0
Description
Below doesn’t work
<TouchableRipple onLongPress={() => console.log('on long press')}>
//
</TouchableRipple>
whereas onPress
works
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
react native - onLongPress is not working same as onClick
I have used useState for both. When I long press the item it opens the menu but again if I Long press the...
Read more >onLongPress is not working same as onClick : r/reactnative
I am passing onLongPress on a Component which has same function as onClick. I have used useState for both . When I long...
Read more >Handling Touches - React Native
These long presses can be handled by passing a function to the onLongPress props of any of the "Touchable" components. Let's see all...
Read more >Add LongPress on Button using TouchableOpacity Example
Example to use longpress on button using TouchableOpacity in React Native.
Read more >onLongPress | VueUse
Listen for a long press on an element. Function provides modifiers in options. stop; once; prevent; capture; self. Demo #. source. Long Pressed:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Check this working example. Make sure to also pass onPress.
For my work normally, It’s my example.
` <List.Section> {this.state.contatoList.map((item, i) => ( <>
</List.Section> `