Skip to content

Commit f50feca

Browse files
Merge branch 'main' into 1128_fluff@main
2 parents dd33cbe + 743c8db commit f50feca

File tree

4 files changed

+30
-32
lines changed

4 files changed

+30
-32
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Type: Package
22
Package: teal
33
Title: Exploratory Web Apps for Analyzing Clinical Trials Data
4-
Version: 0.15.2.9034
5-
Date: 2024-05-08
4+
Version: 0.15.2.9035
5+
Date: 2024-05-09
66
Authors@R: c(
77
person("Dawid", "Kaledkowski", , "dawid.kaledkowski@roche.com", role = c("aut", "cre"),
88
comment = c(ORCID = "0000-0001-9533-457X")),

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# teal 0.15.2.9034
1+
# teal 0.15.2.9035
22

33
### Miscellaneous
44
* Filter mapping display is no longer coupled to the snapshot manager.

R/TealAppDriver.R

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -243,23 +243,20 @@ TealAppDriver <- R6::R6Class( # nolint: object_name.
243243
self$get_value(output = sprintf("%s-%s", self$active_module_ns(), output_id))
244244
},
245245
#' @description
246-
#' Get the output from the module's `teal.widgets::table_with_settings` in the `teal` app.
246+
#' Get the output from the module's `teal.widgets::table_with_settings` or `DT::DTOutput` in the `teal` app.
247247
#' This function will only access outputs from the name space of the current active teal module.
248248
#'
249-
#' @param tws (`character(1)`) `table_with_settings` namespace name.
249+
#' @param table_id (`character(1)`) The id of the table in the active teal module's name space.
250250
#' @param which (integer) If there is more than one table, which should be extracted.
251+
#' By default it will look for a table that is built using `teal.widgets::table_with_settings`.
251252
#'
252253
#' @return The data.frame with table contents.
253-
get_active_module_tws_output = function(tws, which = 1) {
254+
get_active_module_table_output = function(table_id, which = 1) {
254255
checkmate::check_number(which, lower = 1)
255-
checkmate::check_string(tws)
256-
table <-
257-
rvest::html_table(
258-
self$get_html_rvest(
259-
self$active_module_element(sprintf("%s-table-with-settings", tws))
260-
),
261-
fill = TRUE
262-
)
256+
checkmate::check_string(table_id)
257+
table <- self$active_module_element(table_id) %>%
258+
self$get_html_rvest() %>%
259+
rvest::html_table(fill = TRUE)
263260
if (length(table) == 0) {
264261
data.frame()
265262
} else {
@@ -270,13 +267,13 @@ TealAppDriver <- R6::R6Class( # nolint: object_name.
270267
#' Get the output from the module's `teal.widgets::plot_with_settings` in the `teal` app.
271268
#' This function will only access plots from the name space of the current active teal module.
272269
#'
273-
#' @param pws (`character(1)`) `plot_with_settings` namespace name.
270+
#' @param plot_id (`character(1)`) The id of the plot in the active teal module's name space.
274271
#'
275272
#' @return The `src` attribute as `character(1)` vector.
276-
get_active_module_pws_output = function(pws) {
277-
checkmate::check_string(pws)
273+
get_active_module_plot_output = function(plot_id) {
274+
checkmate::check_string(plot_id)
278275
self$get_attr(
279-
self$active_module_element(sprintf("%s-plot_main > img", pws)),
276+
self$active_module_element(sprintf("%s-plot_main > img", plot_id)),
280277
"src"
281278
)
282279
},

man/TealAppDriver.Rd

Lines changed: 15 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)