Open gogonzo opened 1 month ago
data as reactive passed to srv_teal is not validated (only teal_data_module is)
data
srv_teal
This happens - no error messages, only log entry that Reactive data failed
Reactive data failed
Related to https://github.com/insightsengineering/teal/issues/1307
What happened?
data
as reactive passed tosrv_teal
is not validated (only teal_data_module is)This happens - no error messages, only log entry that
Reactive data failed
app
```r options( teal.log_level = "TRACE", teal.show_js_log = TRUE, # teal.bs_theme = bslib::bs_theme(version = 5), shiny.bookmarkStore = "server" ) library(scda) pkgload::load_all("teal") # pkgload::load_all("teal.slice") ui_data <- function(id) { ns <- NS(id) tagList( actionButton(ns("submit"), label = "Submit to run") ) } srv_data <- function(id, ...) { moduleServer(id, function(input, output, session) { eventReactive(input$submit, { data <- teal_data() |> within({ logger::log_trace("Loading data") stop("error") }) join_keys(data) <- default_cdisc_join_keys[c("ADSL", "ADTTE")] data }) }) } modules <- modules( teal.modules.general::tm_data_table("Data Table"), example_module("Example Module", datanames = "ADTTE"), module( ui = function(id) { ns <- NS(id) tagList( tableOutput(ns("filter_summary")) ) }, server = function(id, datasets) { moduleServer(id, function(input, output, session) { output$filter_summary <- renderTable({ datasets$get_filter_overview(datanames = datasets$datanames()) }) }) } ) ) shinyApp( ui = function(request) { fluidPage( ui_data("data"), ui_teal(id = "teal", modules = modules) ) }, server = function(input, output, session) { data_rv <- srv_data("data", data = data, modules = modules) srv_teal(id = "teal", data = data_rv, modules = modules) } ) ```