Given pseduo-like code:
dateRange <- reactive({
input$select_dates #action button
save_selected_date_range()
isolate(input$dateRange)
})
customerId <- reactive({
#check if customer has saved date range if so trigger
saved_info <- saved_preferences(input$customerId)
if(nrow(saved_info) > 0) {
flog.info(saved_info)
updateDateRangeInput(session, "dateRange", start = saved_info$start, end = saved_info$start)
}
input$customerId
})
The scenario:
Inputs: A selected date range and customer selector. The date range is registered when the action button is pressed.
Desired Action: We would like the ability to load saved date ranges if available when a customer is picked.
Question: How do I trigger the input$select_dates as if the action button was pushed? Something like invalidateLater without the timer would be nice. Or if there is a manual way to mark or flag the input$select_dates as invalidated.