I am trying to make a reactive UI with SelectInput in shiny. I have a server with renderUI selectizeInput (server.R), if I try to make two choices form the conditionalPanels call uiOutput, the server freezes (ui.R):
server.R
output$selz_01 <- renderUI({
withProgress(message = 'Data is loading, please wait ...', value = 1:100, {
selectizeInput(inputId="valuez01",
label="Select value 1:",
choices= unique(tab_01()$key),
selected =head(unique(tab_01()$key)),
multiple = TRUE)
}) })
output$selz_02 <- renderUI({
withProgress(message = 'Data is loading, please wait ...', value = 1:100, {
selectizeInput(inputId="valuez02",
label="Select value 2:",
choices= unique(tab_01()$measurements),
selected =head(unique(tab_01()$measurements)),
multiple = TRUE)
}) })
output$selz_03 <- renderUI({
withProgress(message = 'Data is loading, please wait ...', value = 1:100, {
selectizeInput(inputId="valuez03",
label="Select value 3:",
choices= unique(tab_01()$date),
selected =head(unique(tab_01()$date)),
multiple = TRUE)
}) })
ui.R
radioGroupButtons(
inputId = "selChoices",
choiceNames =
list(icon("dice-one"), icon("dice-two"),
icon("dice-three")),
choiceValues =
list("one", "two", "three"),
label = "Choices",
status = "default"
),
conditionalPanel(
condition = "input.selChoices == 'one'",
uiOutput("selz_01"),
uiOutput("selz_02")
),
conditionalPanel(
condition = "input.selChoices == 'two'",
uiOutput("selz_01"),
uiOutput("selz_03")
),
conditionalPanel(
condition = "input.selChoices == 'three'",
uiOutput("selz_02"),
uiOutput("selz_03")
),