Skip to content

Commit f5945f6

Browse files
committed
Add back in the Tab children position argument
Fixes #3520
1 parent 55bf408 commit f5945f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/ipywidgets/ipywidgets/widgets/widget_selectioncontainer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ class Tab(_SelectionContainer):
9191
_view_name = Unicode('TabView').tag(sync=True)
9292
_model_name = Unicode('TabModel').tag(sync=True)
9393

94-
def __init__(self, **kwargs):
95-
if 'children' in kwargs and 'selected_index' not in kwargs and len(kwargs['children']) > 0:
94+
def __init__(self, children=(), **kwargs):
95+
if len(children) > 0 and 'selected_index' not in kwargs:
9696
kwargs['selected_index'] = 0
97-
super(Tab, self).__init__(**kwargs)
97+
super().__init__(children=children, **kwargs)
9898

9999
def _reset_selected_index(self):
100100
# if there are no tabs, then none should be selected

0 commit comments

Comments
 (0)