Tooltip: onPress event object is not propagated to parent component on native

Open Beginner friendly
#5,003 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
react-native, typescript
Domain
mobile

Research direction

Start at src/components/Tooltip/Tooltip.tsx around line 156 and reproduce the native behavior with the linked Expo Snack on Android or iOS. Trace how the onPress callback receives its arguments and verify that the event object reaches the parent callback, including the reported pressable-related behavior.

Written by the indexing model from the issue text.

Description

bug
Current behaviour

onPress (and probably other pressable-related) event object is not propagated to parent component on native (Android/iOS).

This line is suspicious:
https://github.com/callstack/react-native-paper/blob/main/src/components/Tooltip/Tooltip.tsx#L156C18-L156C25

Expected behaviour

Event object should be passed to parent callbacks.

How to reproduce?

https://snack.expo.dev/@szado/rnp-tooltip-onpress-bug

Your Environment
software version
react-native-paper 5.15.3
expo sdk 55
Dominant language
TypeScript
Stars
14.5k
Forks
2.2k
Avg merge
5d 23h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from callstack/react-native-paper

All issues in callstack/react-native-paper

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.