Skip to content

Commit

Permalink
Clean-up timegraph-container-component when closing widget
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
  • Loading branch information
bhufmann committed May 3, 2021
1 parent fcab169 commit 648c26c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ export class ReactTimeGraphContainer extends React.Component<ReactTimeGraphConta
});
}

componentWillUnmount(): void {
if (this.container) {
this.container.destroy();
}
}

shouldComponentUpdate(nextProps: ReactTimeGraphContainer.Props): boolean {
return nextProps.options.height !== this.props.options.height
|| nextProps.options.width !== this.props.options.width;
Expand Down

0 comments on commit 648c26c

Please sign in to comment.