Skip to content

Commit

Permalink
Add ReactiveHTML remove script
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jul 14, 2021
1 parent 423c991 commit c0fe370
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/user_guide/Custom_Components.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
"\n",
"- `'render'`: This callback is invoked during initial rendering of the component.\n",
"- `'after_layout'`: This callback is invoked after the component has been fully rendered and the layout is fully computed.\n",
"- `'remove'`: This callback is invoked when the component is removed.\n",
"\n",
"#### Explicit calls\n",
"\n",
Expand Down
1 change: 1 addition & 0 deletions panel/models/reactive_html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export class ReactiveHTMLView extends PanelHTMLBoxView {
super.disconnect_signals()
this._remove_event_listeners()
this._remove_mutation_observers()
this.run_script('remove', true)
}

get child_models(): LayoutDOM[] {
Expand Down

0 comments on commit c0fe370

Please sign in to comment.