react-native-elements / playground

Exploring Possibilities with React Native Elements
https://react-native-elements.js.org
MIT License
19 stars 43 forks source link

fix overlay isVisible checkbox remains checked #62

Closed ankushdutt closed 3 years ago

ankushdutt commented 3 years ago

fixes: #61

Edit: Finally found a way to hook props to the children using react-view AST. Now it works for both on clicking backdrop and TouchableOpacity

netlify[bot] commented 3 years ago

Deploy preview for rne-playground ready!

Built with commit 419bc1a2899cecf3ab8a0112d6bcedf988cac798

https://deploy-preview-62--rne-playground.netlify.app

ankushdutt commented 3 years ago

Gotcha @tewarig, thanks! Added that back

pranshuchittora commented 3 years ago

This works, great. But can we do this with a simple state hook -> https://react-view.netlify.app/?path=/story/useview--state-hook

ankushdutt commented 3 years ago

But can we do this with a simple state hook -> https://react-view.netlify.app/?path=/story/useview--state-hook

No, we can't. This only works for the top level prop (like onBackdropPress). Here, TochableOpacity is present inside of chidren. So, we must correctly target its onPress handler using the react-view AST.

pranshuchittora commented 3 years ago

Thanks