Shiny: dynamically add/ remove textInput rows based on index
问题 Based on this article I changed my script: library(shiny) ui = fluidPage( actionButton("add", "Add new Row", icon=icon("plus", class=NULL, lib="font-awesome")), actionButton("remove", "Remove last Row", icon=icon("times", class = NULL, lib = "font-awesome")), tags$div(id = 'placeholder') ) server = function(input, output) { ## keep track of elements inserted and not yet removed inserted <- c() observeEvent(input$add, { id <- '' insertUI( selector = "#placeholder", where = "beforeBegin", ui