Skip to content

Commit 2dd04b1

Browse files
committed
Remove assumption from tab widget that changes to children should reset selected index to 0.
It will be the user’s responsibility to set the selected index to something that makes sense when they change the children.
1 parent 4483e55 commit 2dd04b1

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

ipywidgets/widgets/widget_selectioncontainer.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ def __init__(self, **kwargs):
9090
kwargs['selected_index'] = 0
9191
super(Tab, self).__init__(**kwargs)
9292

93-
@observe('children')
94-
def _observe_children(self, change):
95-
if len(change.new) > 0:
96-
self.selected_index = 0
97-
9893
@register
9994
class Stacked(_SelectionContainer):
10095
"""Displays only the selected child."""

0 commit comments

Comments
 (0)