observeEvent in insertUI generated in loop
问题 When I create new objects with insertUI in a reactive way, all the observers that I create work perfectly fine, as you can see in the following dummy code: library(shiny) # Define the UI ui <- fluidPage( actionButton("adder", "Add"), tags$div(id = 'placeholder') ) # Define the server code server <- function(input, output) { rv <- reactiveValues() rv$counter <- 0 observeEvent(input$adder,{ rv$counter <- rv$counter + 1 add <- sprintf("%03d",rv$counter) filterId <- paste0('adder_', add) divId <-