In this minimal example, you can try swapping UI-code in and out to see the problem.
#### SWAP IN THESE LINES - APP WILL THEN WORK...
# library(shinyWidgets)
# fluidPage(fluidRow(
# column(width = 4,
# uiOutput(outputId = 'ui_picker_chooseproject')
# ),
#
# column(width = 4,
# shiny::tableOutput(outputId = 'table'),
# )#column
# ))
#### THESE LINES FAILS TO RUN RENDERING FUNCTION
library(yonder)
webpage(
nav = navbar(brand = 'Show table rows based on picker length'),
yonder::container(
yonder::columns(
yonder::column(width = 4,
yonder::card(header = 'Choose projects',
shiny::uiOutput(outputId = 'ui_picker_chooseproject')
)
),
yonder::column(width = 4,
yonder::card(header = 'Choosen projects list',
shiny::tableOutput(outputId = 'table')
)
)
)
)
)
And the server :
library(dplyr)
library(shinyWidgets)
# Define server logic required to draw a histogram
server <- function(input, output, session) {
df_pc <- reactive({
data.frame(ProjectID = c(1, 2, 3, 4), ProjectName = c('a', 'b', 'c', 'd'))
})
output$ui_picker_chooseproject <- renderUI({
pickerInput(inputId = 'picker', label = 'pick', multiple = TRUE,
choices = setNames(df_pc()$ProjectID, df_pc()$ProjectName))
})
output$table <- renderTable({cars[1:length(input$picker), ]})
}
In this minimal example, you can try swapping UI-code in and out to see the problem.
And the server :