diff --git a/NEWS.md b/NEWS.md index 2dba4e04f..3dbee189d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # teal.modules.general 0.5.0.9003 +### Enhancements + +- Modules now return a `teal_report` object that contains the data, code and reporter. All the reporter buttons were removed from the modules' UI. + # teal.modules.general 0.5.0 ### Breaking changes diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 1e8ae5a61..b75aee801 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -1272,13 +1272,13 @@ srv_distribution <- function(id, output_dist_q <- reactive(c(common_q(), req(dist_q()))) output_qq_q <- reactive(c(common_q(), req(qq_q()))) - # Summary table listing has to be created separately to allow for qenv join - q_common <- common_q() - teal.reporter::teal_card(q_common) <- c( - teal.reporter::teal_card(q_common), - "## Statistics table" - ) output_summary_q <- reactive({ + # Summary table listing has to be created separately to allow for qenv join + q_common <- common_q() + teal.reporter::teal_card(q_common) <- c( + teal.reporter::teal_card(q_common), + "## Statistics table" + ) if (iv_r()$is_valid()) { within(q_common, { summary_table <- rtables::df_to_tt(summary_table_data) @@ -1358,7 +1358,7 @@ srv_distribution <- function(id, output$summary_table <- DT::renderDataTable(summary_r()) tests_r <- reactive({ - q <- req(output_test_q()) + q <- req(decorated_output_test_q()) DT::datatable(q[["test_table_data"]]) }) @@ -1384,7 +1384,7 @@ srv_distribution <- function(id, decorated_output_q <- reactive({ tab <- req(input$tabs) # tab is NULL upon app launch, hence will crash without this statement - test_q_out <- output_test_q() + test_q_out <- decorated_output_test_q() out_q <- switch(tab, Histogram = decorated_output_dist_dims_q(),