Hi, I am building app where i have multiple tabs. Each of the tab contains few widgets. Within a tab, there is a base widget and there are other widgets whose value are function of the base widget.
So while working in Tab 2 (lets say), if i change the value of base widget I expect to see the dependent widgets getting changed accordingly. But as soon as i change the base widget, I am taken to Tab 1, although the widgets of Tab 2 are changed. I am getting the desired output in Tab 2 widgets but I don’t want to be taken to Tab 1 when I change something in Tab2
So is there a way that changing something in Tab 2 to trigger a function call in Tab 2 doesn’t take me to Tab 1?
Following is the code for easy understanding (also attaching image of the same):
widget_a = pn.widgets.TextInput(name=“a”, width=60, value=‘4’)
widget_b = pn.widgets.TextInput(name=“b”, width=60, value=‘7’)
sheet_widgets = pn.Column(widget_b,
pn.widgets.TextInput(name= “var3”, width = 60, value = str(variable[“x2”])),
pn.widgets.TextInput(name= “var4”, width = 60, value = str(variable[“y2”])))
def show_tabs(widget_a_value, widget_b_value):
result = b_operation(widget_b_value)
sheet = get_sheet(result)
show = pn.Tabs((“Tab 1”, widget_a), (“Tab 2”, sheet))
disp = pn.Column(show_tabs)