Hi!
I am building an application where the user chooses something from input.select().
The choices in this component depend on the input file uploaded. I have function that is passing a list of choices to the component.
I have gone through [Shiny for Python - Dynamic UI Shiny for Python - Express in depth (posit.co) and Shiny for Python - Express in depth (posit.co). I tried to use @render.express but it doesn't seem to render the ui.
Here's what my code looks like:
with ui.nav_panel("Force Per Joint"):
with ui.layout_sidebar():
with ui.sidebar(id='case_options', width=350):
with ui.accordion(open=True):
with ui.accordion_panel(title="output_case"):
ui.input_selectize(id = "outputCases", label="outputCasesLabel", choices = [])
@reactive.effect
def getOutputCaseOptions():
file: list[FileInfo] | None = input.file1()
if file is not None:
outputCaseOptions = getOutputCases()
ui.update_selectize(id = "outputCases", choices = outputCaseOptions)
with ui.navset_card_tab(id="force_choices"):
with ui.nav_panel("Plots 📈"):
with ui.layout_columns():
with ui.card(full_screen=True):
"Something"
Could someone help me with the way ahead?
Thanks!