Skip to content

Commit

Permalink
Fixed #245
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Dec 10, 2017
1 parent b5fc5ec commit 8e3ac50
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ export class Accordion extends Component {
}

componentWillReceiveProps(nextProps) {
this.setState({
activeIndex: nextProps.activeIndex
});
if(nextProps.activeIndex != null) {
this.setState({
activeIndex: nextProps.activeIndex
});
}
}

onTabClick(event, tab, i) {
Expand Down

0 comments on commit 8e3ac50

Please sign in to comment.