I am trying to build a widget where I am parsing data from json and populating the tools, base form could contain simple input fields and a drop-down menu option. I want to add nested widgets based on the users choice for example as given below if the user wants an advanced parameter and select the "Full Parameter" option it should populate nested widgets (widget generated based on user input i.e. selected option)
from IPython.display import display from ipywidgets import Dropdown def dropdown_eventhandler(change): print(change.new) option_list = ("Full Perameter", "Default Perameter") dropdown = Dropdown(description="Choose one:", options=option_list) dropdown.observe(dropdown_eventhandler, names='value') display(dropdown)
I tried several things but, it dint work. I tried to invoke the underlying widget by providing conditional parameters on the callback function.
Please suggest how to solve this problem. thanks