Skip to content

Commit

Permalink
Merge pull request #387 from edison-hm/dev
Browse files Browse the repository at this point in the history
fix: collapseItem ref
  • Loading branch information
JeromeLin committed Dec 31, 2019
2 parents ac996b7 + cc2c988 commit fbd9c7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/collapse/CollapseItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ export default class CollapseItem extends PureComponent<CollapseItemProps, any>
this.content.style.height = `${this.content.offsetHeight}px`;

setTimeout(() => {
this.content.style.height = '0px';
this.content && (this.content.style.height = '0px');
}, 0);
} else {
this.content.style.height = '0px';

setTimeout(() => {
this.content.style.height = `${this.getContentHeight(this.content)}px`;
this.content && (this.content.style.height = `${this.getContentHeight(this.content)}px`);
}, 0);
}
};
Expand Down

0 comments on commit fbd9c7e

Please sign in to comment.