Skip to content

Commit 91c74af

Browse files
authored
Fix widget initialization issue
Fix widgets not initializing properly when integrating with third-party libraries (such as `ipywidgets`)
1 parent 53c4770 commit 91c74af

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plotly/basewidget.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ def __init__(
142142
# views of this widget
143143
self._view_count = 0
144144

145+
# Initialize widget layout and data for third-party widget integration
146+
# --------------------------------------------------------------------
147+
self._widget_layout = deepcopy(self._layout_obj._props)
148+
self._widget_data = deepcopy(self._data)
149+
145150
def show(self, *args, **kwargs):
146151
return self
147152

0 commit comments

Comments
 (0)