Is there a recommend way to isolate parts of an input object within a Shiny module? I have some modules that can't know beforehand what input ids will be there so I do something like the below which is a bit hacky but seems to work
# input_ids are the reactive ids,
# dots are list(...) of other non-reactive vars, input is shiny input
copy_input_ids <- function(input_ids, input, dots){
new <- lapply(input_ids, function(x){dots[[x]] <- input[[x]]})
modifyList(dots, setNames(new, input_ids))
}
The problem is that means any input change is a dependency to the reactives afterwards, so it recalculates all reactive functions each time any input button is pushed. Is there a way to take only a subset of the input$elements and not depend on the others?
No Answers