Skip to content

Commit

Permalink
fix: clearing the _container & el in the dispose function
Browse files Browse the repository at this point in the history
  • Loading branch information
危翰 committed Aug 8, 2023
1 parent 6ecd62b commit ae8cf31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/component/tooltip/TooltipHTMLContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,9 @@ class TooltipHTMLContent {

dispose() {
this.el.parentNode.removeChild(this.el);
this.el = null
this._container = null
this._api = null
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/component/tooltip/TooltipModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export interface TooltipOption extends CommonTooltipOption<TopLevelFormatterPara
* If append popup dom to some other dom element
* Only available when renderMode is html
*/
appendTo?: ((chartContainer?: HTMLElement) => HTMLElement | undefined | null) | string | HTMLElement
appendTo?: ((chartContainer: HTMLElement) => HTMLElement | undefined | null) | string | HTMLElement


/**
Expand Down

0 comments on commit ae8cf31

Please sign in to comment.