When using selectizeInput and updateSelectizeInput to update the choices, the update does not appear when using with a material_page.
An example:
shinyApp(
material_page(fluidPage(
material_button("add","Add 10"),
selectizeInput("foo", "Foo", choices = c("a","b")),
textOutput("text")
)),
function(input, output, session) {
choices <- reactive({
c("a", "b", (0:(10*as.numeric(input$add))))
})
output$text <- renderText({ choices() })
observe({
updateSelectizeInput(session, 'foo', choices = choices(), server = TRUE)
})
}
)
It gets resolved when adding the selectizeInput from server side
shinyApp(
material_page(fluidPage(
material_button("add","Add 10"),
uiOutput("TT"),
textOutput("text")
)),
function(input, output, session) {
choices <- reactive({
c("a", "b", (0:(10*as.numeric(input$add))))
})
output$text <- renderText({ choices() })
output$TT<-renderUI({
selectizeInput("foo", "Foo", choices = c("a","b"))
})
observe({
updateSelectizeInput(session, 'foo', choices = choices(), server = TRUE)
})
}
)
When using
selectizeInputandupdateSelectizeInputto update the choices, the update does not appear when using with amaterial_page.An example:
It gets resolved when adding the
selectizeInputfrom server side