Skip to content

Commit

Permalink
Add missing transformators arg (#839)
Browse files Browse the repository at this point in the history
`transformators` arg is addressed in `teal`. Every module which has
`data` in the server needs a `transformators` argument
  • Loading branch information
gogonzo authored Feb 3, 2025
1 parent ee725dd commit 91ad352
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
6 changes: 4 additions & 2 deletions R/tm_data_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ tm_data_table <- function(label = "Data Table",
),
server_rendering = FALSE,
pre_output = NULL,
post_output = NULL) {
post_output = NULL,
transformators = list()) {
message("Initializing tm_data_table")

# Start of assertions
Expand Down Expand Up @@ -145,7 +146,8 @@ tm_data_table <- function(label = "Data Table",
ui_args = list(
pre_output = pre_output,
post_output = post_output
)
),
transformators = transformators
)
attr(ans, "teal_bookmarkable") <- TRUE
ans
Expand Down
6 changes: 4 additions & 2 deletions R/tm_front_page.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ tm_front_page <- function(label = "Front page",
additional_tags = tagList(),
footnotes = character(0),
show_metadata = deprecated(),
datanames = if (missing(show_metadata)) NULL else "all") {
datanames = if (missing(show_metadata)) NULL else "all",
transformators = list()) {
message("Initializing tm_front_page")

# Start of assertions
Expand Down Expand Up @@ -105,7 +106,8 @@ tm_front_page <- function(label = "Front page",
ui = ui_front_page,
ui_args = args,
server_args = list(tables = tables),
datanames = datanames
datanames = datanames, ,
transformators = transformators
)
attr(ans, "teal_bookmarkable") <- TRUE
ans
Expand Down
6 changes: 4 additions & 2 deletions R/tm_variable_browser.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ tm_variable_browser <- function(label = "Variable Browser",
parent_dataname = "ADSL",
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
ggplot2_args = teal.widgets::ggplot2_args(),
transformators = list()) {
message("Initializing tm_variable_browser")

# Start of assertions
Expand Down Expand Up @@ -126,7 +127,8 @@ tm_variable_browser <- function(label = "Variable Browser",
ui_args = list(
pre_output = pre_output,
post_output = post_output
)
),
transformators = transformators
)
# `shiny` inputs are stored properly but the majority of the module is state of `datatable` which is not stored.
attr(ans, "teal_bookmarkable") <- NULL
Expand Down
6 changes: 5 additions & 1 deletion man/tm_data_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/tm_front_page.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/tm_g_distribution.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/tm_variable_browser.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 91ad352

Please sign in to comment.