react-native-simple-expand
react-native-simple-expand copied to clipboard
Bug in Android
Putting in multiple Expand components causes hidden contents to show and overlap.
I've overcome that by setting backgroundColor
of fthe View
above Expand
view
hey @rkostrab, hmm this bug rings a bell actually. By any chance does the problem look to resolve itself if you set minHeight={1} on the expand component? I seem to remember when creating animated components in the past that this was a problem.
@kyle-ssg minHeight={1}
is not working.
code:
const { isExpanded } = this.state;
<View style={styles.container}>
<Button title={"Toggle"} onPress={() => this.setState({ isExpanded: !isExpanded }) } />
<Expand minHeight={1} value={isExpanded}>
<Text style={styles.smallText}>{"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue dolor sit amet justo tristique, sit amet semper ligula bibendum."}</Text>
</Expand>
<Text style={styles.bigText}>Welcome to React Native!</Text>
</View>
renders this:
I forked the project and set the background color in menuStyle and that worked for me on Android.
menuStyle: { overflow: "scroll", backgroundColor: "transparent", },
It should be great to make PR with a fix rather than a fork.
Yeah I am working on some other changes also, will submit a PR when I get a chance. Andrew Royce Founder, Developer R3 Mobile, LLC M 513.498.4137
http://www.r3mobile.co http://www.linkedin.com/in/andrewwroyce
On Wed, Aug 8, 2018 at 3:30 AM Rastislav Kostrab [email protected] wrote:
It should be great to make PR with a fix rather than a fork.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kyle-ssg/react-native-simple-expand/issues/2#issuecomment-411313796, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5YsbFe3PwIKU4WIFEfBonxWnVEalLrks5uOpOKgaJpZM4PH1ni .