reset outputs on updated data

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-30 10:02:29 +02:00
commit 1e85fd347f
No known key found for this signature in database
7 changed files with 407 additions and 249 deletions

View file

@ -351,9 +351,25 @@ data_visuals_server <- function(id,
prismCodeBlock(paste0("#Plotting\n", rv$code))
})
shiny::observeEvent(
list(
data()
),
{
shiny::req(data())
rv$plot <- NULL
}
)
output$plot <- shiny::renderPlot({
shiny::req(rv$plot)
rv$plot
# shiny::req(rv$plot)
# rv$plot
if (!is.null(rv$plot)) {
rv$plot
} else {
return(NULL)
}
})
output$download_plot <- shiny::downloadHandler(