Is your feature request related to a problem? Please describe.
When you have a nested Pressable contained within another Pressable, the hover state of the inner Pressable cannot easily be shared with the parent Pressable. I encountered this problem when trying to make a menu that displays when an element is hovered over.
This code sandbox illustrates the problem I'm having.
Describe a solution you'd like
I understand that this isn't always the desired behavior, so perhaps just adding a boolean prop to the Pressable component such as shouldBubbleHoverState, would do the trick.
Describe alternatives you've considered
A temporary workaround is to use a <TouchableOpacity /> instead of a <Pressable /> for the nested element. This has some limitations, however, and would not allow the nested element to take advantage of hoverability too.
Happy to chat some more if you have ideas, need clarification, or can think of other workarounds in the meantime. Thanks!
Is your feature request related to a problem? Please describe.
When you have a nested
Pressablecontained within anotherPressable, the hover state of the innerPressablecannot easily be shared with the parentPressable. I encountered this problem when trying to make a menu that displays when an element is hovered over.This code sandbox illustrates the problem I'm having.
Describe a solution you'd like
I understand that this isn't always the desired behavior, so perhaps just adding a boolean prop to the
Pressablecomponent such asshouldBubbleHoverState, would do the trick.Describe alternatives you've considered
A temporary workaround is to use a
<TouchableOpacity />instead of a<Pressable />for the nested element. This has some limitations, however, and would not allow the nested element to take advantage of hoverability too.Happy to chat some more if you have ideas, need clarification, or can think of other workarounds in the meantime. Thanks!