Skip to content

Commit 0ea60ef

Browse files
authored
Don't supply new layout defaults (or fill) jupyter-widget-controls (#118)
1 parent 4b253c1 commit 0ea60ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shinywidgets/_shinywidgets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ def set_layout_defaults(widget: Widget) -> Tuple[Widget, bool]:
292292
if not isinstance(widget, DOMWidget):
293293
return (widget, fill)
294294

295+
# Do nothing for "input-like" widgets (e.g., ipywidgets.IntSlider())
296+
if getattr(widget, "_model_module", None) == "@jupyter-widgets/controls":
297+
return (widget, False)
298+
295299
layout = widget.layout # type: ignore
296300

297301
# Give the ipywidget Layout() width/height defaults that are more sensible for

0 commit comments

Comments
 (0)