Are there any examples of dynamically creating widgets with the reactive API? I was expecting this to work but the sliders don’t seem to move. I work on Shiny for Python, but am quite new to Panel so my apologies if this is an obvious question. For reference here is the Shiny implementation that I’m trying to replicate.
import panel as pn
def create_sliders(n):
sliders = [pn.widgets.IntSlider(name=f"Slider {i+1}") for i in range(n)]
outputs = [pn.widgets.TextInput(value=f"Slider {i+1} value: {slider.value}") for i, slider in enumerate(sliders)]
return pn.Column(*(slider, output) for slider, output in zip(sliders, outputs))
n_input = pn.widgets.IntInput(name="Number of Sliders", value=1)
sliders = pn.bind(create_sliders, n=n_input)
app = pn.Column(n_input, sliders)
# Make the app servable
app.servable()