We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55bf408 commit f5945f6Copy full SHA for f5945f6
python/ipywidgets/ipywidgets/widgets/widget_selectioncontainer.py
@@ -91,10 +91,10 @@ class Tab(_SelectionContainer):
91
_view_name = Unicode('TabView').tag(sync=True)
92
_model_name = Unicode('TabModel').tag(sync=True)
93
94
- def __init__(self, **kwargs):
95
- if 'children' in kwargs and 'selected_index' not in kwargs and len(kwargs['children']) > 0:
+ def __init__(self, children=(), **kwargs):
+ if len(children) > 0 and 'selected_index' not in kwargs:
96
kwargs['selected_index'] = 0
97
- super(Tab, self).__init__(**kwargs)
+ super().__init__(children=children, **kwargs)
98
99
def _reset_selected_index(self):
100
# if there are no tabs, then none should be selected
0 commit comments