Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
collapse refactoring part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
rnosov committed Feb 17, 2018
1 parent 3ba19b5 commit f1afa3e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/RevealBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ class RevealBase extends React.Component {
}

componentDidMount() {
if (this.props.cascade) console.log('Mount:', this.props);
if (!this.el || this.props.disabled)
return;
const parentGroup = this.context.transitionGroup;
Expand Down Expand Up @@ -372,7 +371,6 @@ class RevealBase extends React.Component {
}

componentWillReceiveProps (props) {
if (props.cascade) console.log('Rec:', props);
if ('when' in props)
this.isOn = !!props.when;
if (!this.isOn && props.onExited && ('exit' in props) && props.exit === false ) {
Expand All @@ -383,7 +381,7 @@ class RevealBase extends React.Component {
return;
//if (props.responsive && !props.when && this.isOn && props.collapse && !this.props.collapse) {
if (props.collapse && !this.props.collapse) {
this.setState({ collapse: RevealBase.getInitialCollapseStyle(props)});
this.setState({ style: { }, collapse: RevealBase.getInitialCollapseStyle(props)});
this.isShown = false;
return;
}
Expand Down Expand Up @@ -412,8 +410,7 @@ class RevealBase extends React.Component {
}

render() {
if (this.props.cascade) console.log('Render:', this.props);

//if (this.props.cascade) console.log('Render:', this.props);
let child = this.getChild();
//if (this.props.disabled)
// return child;
Expand Down

0 comments on commit f1afa3e

Please sign in to comment.