We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have this item on horizontal flatlist.
const Relation = () => { return ( <Surface style={styles.surface}> <TouchableRipple borderless style={styles.touchable} onPress={onPress}> <View style={styles.body}> {/** render something */} </View> </TouchableRipple> </Surface> ); }; const styles = StyleSheet.create({ body: { alignItems: 'center', padding: 12 }, surface: { marginVertical: 12, maxWidth: 140, borderRadius: 16, }, touchable: { backgroundColor: 'rgb(153, 246, 228)', borderRadius: 16, flexGrow: 1, }, })
Items have different height, so I set flexGrow: 1 in TouchableRipple. But it only works on Android. On iOS, it doesn't grow to fill like Android.
flexGrow: 1
TouchableRipple
Card component has same bug.
View inside Surface should fill all when flexGrow: 1 is set
Surface
https://snack.expo.dev/@pnthach95/surfaceios
Android
iOS
I set flex: 1 at this line
flex: 1
react-native-paper/src/components/Surface.tsx
Line 205 in 198c488
The text was updated successfully, but these errors were encountered:
I experience similar visual weirdness with a Card component.
Sorry, something went wrong.
Hey @RohovDmytro, could you please also attach your example, to make sure that we'll fix both issues?
Hi @lukewalczak, I updated my snack with Card component.
Chip
Card
subtitle
tjaniczek
No branches or pull requests
Current behaviour
I have this item on horizontal flatlist.
Items have different height, so I set
flexGrow: 1
inTouchableRipple
. But it only works on Android. On iOS, it doesn't grow to fill like Android.Card component has same bug.
Expected behaviour
View inside
Surface
should fill all whenflexGrow: 1
is setHow to reproduce?
https://snack.expo.dev/@pnthach95/surfaceios
Preview
Android
![android](https://private-user-images.githubusercontent.com/31266357/250014725-94e7c16e-99fc-43e0-9bb5-357c5672d2cc.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTU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QmWC1BbXotRGF0ZT0yMDI0MDgxMVQxODEwMDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02NmM3NmRiZGZiM2U3OTg1MDJjYTkzZGRlZDAwMjY1YzBlODU4NjA0MDRlMDJmMzdjMmEzODczOGRkYWYzZTA3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9._xw5rU8AdAPkKG3NWJV87zct1KXo_x_EYS5BIywB3oQ)
What have you tried so far?
I set
flex: 1
at this linereact-native-paper/src/components/Surface.tsx
Line 205 in 198c488
Your Environment
The text was updated successfully, but these errors were encountered: