ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

Nested Dropdown menus not working in version 8

Open Fvegini opened this issue 2 years ago • 1 comments

I did this test in 8.1.1 plus some 8.x.x versions, then downgraded to 7.8.1 and it worked.

from ipywidgets import interact

option_list = ["Full Parameter", "Default Parameter"]
full_parameter = ['a', 'b', 'c']
default_parameter = ['d', 'e', 'f']
def option1(option_1):
    if option_1 == 'Full Parameter':
        def option2(option_2):
            print(option_2)
        interact(option2, option_2=full_parameter)
    elif option_1 == 'Default Parameter':
        def option2(option_2):
            print(option_2)
        interact(option2, option_2=default_parameter)
interact(option1, option_1=option_list)

On version 7.8.1 it works and shows two dropdown menus to filter in between. ipy 7 8 1

But on version 8.x.x it only shows one of the dropdowns ipy 8 1 1

Fvegini avatar Oct 19 '23 15:10 Fvegini

Is this still happening? Renders as expected for me in 8.1.2:

image

ibdafna avatar Feb 20 '24 07:02 ibdafna