glennflanagan / react-collapsible

React component to wrap content in Collapsible element with trigger to open and close.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collapsible Not Opening on Parent Click

Abhi-ak opened this issue · comments

Hi, The Collapsible is not opening when I click outside the trigger text. This is my code

<Collapsible className={style.collapsibleParent} openedClassName={style.collapsibleParent} trigger="Contribution Trend" triggerClassName={style.raceViewClosed} triggerOpenedClassName={style.raceViewOpen} onOpen= {() => {this.setState({trendOpen: true})}} onClose= {() => {this.setState({trendOpen: false})}} open={this.state.firstTimeVisit} > <RacingChartView trendOpen={this.state.trendOpen}/> </Collapsible>

My requirement is to open the Collapsible if I click anywhere in the collapsibleParent class. But Currenlty it opens only when clicked on the text Contribution Trend

image

Maybe you need to set the triggerTagName prop to 'div' so it takes up the full width

commented

@Abhi-ak can you please use a bug report to file an issue, I can't use the code you've supplied

commented

Closing due to inactivity