Skip to content

Commit a315cc7

Browse files
authored
Remove widget container after plotly widget view gets destroyed (#178)
1 parent 62489d8 commit a315cc7

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to shinywidgets will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [UNRELEASED] - 2025-01-23
9+
10+
* Fixed an issue with plotly graphs sometimes not getting fully removed from the DOM. (#178)
11+
812
## [0.4.2] - 2024-12-18
913

1014
* Fixed an issue where `@render_widget` would sometimes incorrectly render a new widget without removing the old one. (#167)

js/src/output.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ Shiny.addCustomMessageHandler("shinywidgets_comm_close", async (msg_txt) => {
227227
// way to drop the resize event listener (see the diff in the link above)
228228
// https://github.com/posit-dev/py-shinywidgets/issues/166
229229
delete v.model;
230+
// Ensure sure the lm-Widget container is also removed
231+
v.remove();
230232
}
231233

232234

shinywidgets/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__author__ = """Carson Sievert"""
44
__email__ = "carson@posit.co"
5-
__version__ = "0.4.2"
5+
__version__ = "0.4.2.9000"
66

77
from ._as_widget import as_widget
88
from ._dependencies import bokeh_dependency

0 commit comments

Comments
 (0)