Closed sangonzal closed 2 years ago
You must provide onClose
prop. I tested this code and worked, the onPress
trigged as well:
<Tooltip
isVisible={true}
content={
<View>
<Text> Some text... </Text>
<Pressable onPress={() => {console.log('Triggered') }}>
<Text>Press me</Text>
</Pressable >
</View>
}
useInteractionManager={true}
allowChildInteraction={true}
closeOnChildInteraction={false}
closeOnContentInteraction={false}
onClose={() => console.log('Touched outside the tooltip') }
placement="bottom"
>
{children}
</Tooltip>
@anti-duhring Thanks, you are right, just needed to pass onClose prop, even though it's not being used for anything.
I'd like to navigate from one tooltip to another when the user clicks on a button inside the tooltip. I've added a
Pressable
to the component that gets passed intocontent=
, but theonPress
for thatPressable
never gets triggered when I click on it. Instead, I get the following warning message every time I click on the component:I tried to explicitly set allowChildInteraction={true}, but that didn't have any effect.
Any idea on why this might be happening?