Closed TomCorvus closed 2 months ago
Since 2.19.0, when we use Pressable component from RNGH, parent is now stretched over all available space.
<> <View style={{ backgroundColor: 'red' }}> <Pressable> <Text>Button</Text> </Pressable> </View> <View style={{ flex: 1, backgroundColor: 'blue' }}> <Text>Screen body</Text> </View> </>
The first view will take all the screen when it should only take up the space that the button takes.
https://snack.expo.dev/@tom.corvus/rngh_pressable_2190
2.19.0
0.75.1
iOS
Hermes
React Native (without Expo)
Paper (Old Architecture)
None
iOS simulator
All devices (Emulators/Real)
Yes
Hi @TomCorvus, thank you for the report.
I've opened this PR to hopefully resolve this issue, please let me know if it fixes your issue.
Thanks @latekvo it seems to fix the problem. 💪
Description
Since 2.19.0, when we use Pressable component from RNGH, parent is now stretched over all available space.
Steps to reproduce
The first view will take all the screen when it should only take up the space that the button takes.
Snack or a link to a repository
https://snack.expo.dev/@tom.corvus/rngh_pressable_2190
Gesture Handler version
2.19.0
React Native version
0.75.1
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
None
Device
iOS simulator
Device model
All devices (Emulators/Real)
Acknowledgements
Yes