oblador/react-native-collapsible

Adding padding triggers whole Accordion to collapse?

Open

#279 opened on Feb 22, 2019

View on GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (449 forks)github user discovery
awaiting-replyhelp wanted

Repository metrics

Stars
 (2,589 stars)
PR merge metrics
 (PR metrics pending)

Description

 render() {
        return (
            <View style={styles.container}>
                <Accordion
                    sections={this.state.sections}
                    activeSections={this.state.activeSections}
                    renderHeader={this._renderHeader}
                    renderContent={this._renderSectionContent}
                    onChange={this._updateSections.bind(this)}
                />
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
      flex: 1,
      backgroundColor: 'transparent',
      paddingLeft: 15,
      paddingRight: 15,
      paddingTop: 30
    },

So I have the above code embedded into another accordion - but it seems like when I click on the embedded accordion's header it collapses everything incuding the parent accordion....

Contributor guide