So I have a chain of selectInput()
that I need to render once we have the selection from the previous selectInput()
. It seems to work fine, but the last one isn't render.
In my server.R file I have the following reactive expression and the renderUI expression:
time_series_names <- reactive({
req(input$ac, input$factor_type, input$sub_type1, cancelOutput = FALSE)
#calls an external function to get choices for selectInput...never gets
#called and I'm not sure why...
tryCatch({get_names_of_factors(asset_class = input$ac,
factor_type = input$factor_type,
sub_type = input$sub_type1)},
error = function(e){
cat("Waiting on metadata to be selected...\n")
NULL
})
})
output$selectTimeSeries <- renderUI({
browser()
req(input$ac, input$factor_type, input$sub_type1, cancelOutput = FALSE)
selectInput("var",
label = "Time Series",
choices = time_series_names(),
multiple = TRUE)
})
So you can see the chain of three input$...
required but I'm not sure why I can't get the output$selectTimeSeries
to render with uiOutput
once I have everything selected. I thought since time_series_name()
is reactive it would trigger the renderUI
expression? I did make sure to write uiOutput("selectTimeSeries")
correctly in my ui.R file.