-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Description
Based on the update_selectize example from the docs.
When put inside a module, the update logic breaks if options are passed to update_selectize(). No choices are displayed.
from shiny import App, module, reactive, ui
@module.ui
def reprex_selectize_ui():
return ui.input_selectize("x", "Server side selectize", choices=[], multiple=True)
@module.server
def reprex_selectize_server(input, output, session, starting_value = 0):
@reactive.effect
def _():
ui.update_selectize(
"x",
choices=[f"Foo {i}" for i in range(10000)],
server=True,
# options={"placeholder": "Search"},
# If uncommented, this breaks the update, and no choices are displayed
)
app_ui = ui.page_fluid(
reprex_selectize_ui("reprex_selectize")
)
def server(input, output, session):
reprex_selectize_server("reprex_selectize")
app = App(app_ui, server)