From bf1e2d0a495b139fc0419cffa42ea771be452902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ka=C5=82=C4=99dkowski?= <6959016+gogonzo@users.noreply.github.com> Date: Mon, 20 Nov 2023 17:02:49 +0100 Subject: [PATCH] fix resolve (#967) --- NEWS.md | 2 +- R/module_nested_tabs.R | 2 +- R/module_teal.R | 2 +- R/utils.R | 6 +++--- man/teal_data_to_filtered_data.Rd | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NEWS.md b/NEWS.md index 661898f902..a9e6885d8b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# teal 0.14.0.9019 +# teal 0.14.0.9020 ### New features diff --git a/R/module_nested_tabs.R b/R/module_nested_tabs.R index 0eb274c0aa..0a35f7aaf5 100644 --- a/R/module_nested_tabs.R +++ b/R/module_nested_tabs.R @@ -213,7 +213,7 @@ srv_nested_tabs.teal_module <- function(id, datasets, modules, is_module_specifi moduleServer(id = id, module = function(input, output, session) { modules$server_args <- teal.transform::resolve_delayed(modules$server_args, datasets) if (!is.null(modules$datanames) && is_module_specific) { - datasets$srv_filter_panel("module_filter_panel", active_datanames = reactive(modules$datanames)) + datasets$srv_filter_panel("module_filter_panel") } # Create two triggers to limit reactivity between filter-panel and modules. diff --git a/R/module_teal.R b/R/module_teal.R index c3b3028e48..c1c4952271 100644 --- a/R/module_teal.R +++ b/R/module_teal.R @@ -195,7 +195,7 @@ srv_teal <- function(id, modules, teal_data_rv, filter = teal_slices()) { modules$datanames } # todo: subset teal_data to datanames - datasets_module <- teal_data_to_filtered_data(teal_data_rv()) + datasets_module <- teal_data_to_filtered_data(teal_data_rv(), datanames = datanames) # set initial filters # - filtering filters for this module diff --git a/R/utils.R b/R/utils.R index 904109976d..65647163fc 100644 --- a/R/utils.R +++ b/R/utils.R @@ -55,13 +55,13 @@ include_parent_datanames <- function(dataname, join_keys) { #' @param x (`teal_data`) object #' @return (`FilteredData`) object #' @keywords internal -teal_data_to_filtered_data <- function(x) { +teal_data_to_filtered_data <- function(x, datanames = teal.data::datanames(x)) { checkmate::assert_class(x, "teal_data") - datanames <- x@datanames + checkmate::assert_character(datanames) teal.slice::init_filtered_data( x = as.list(x@env)[datanames], - join_keys = x@join_keys, + join_keys = join_keys(x)[datanames], code = teal.data:::CodeClass$new( code = paste(teal.code::get_code(x), collapse = "\n"), dataname = teal.data::get_dataname(x) diff --git a/man/teal_data_to_filtered_data.Rd b/man/teal_data_to_filtered_data.Rd index 7ab5828072..440abd4504 100644 --- a/man/teal_data_to_filtered_data.Rd +++ b/man/teal_data_to_filtered_data.Rd @@ -4,7 +4,7 @@ \alias{teal_data_to_filtered_data} \title{Create a \code{FilteredData}} \usage{ -teal_data_to_filtered_data(x) +teal_data_to_filtered_data(x, datanames = teal.data::datanames(x)) } \arguments{ \item{x}{(\code{teal_data}) object}