Skip to content

Commit

Permalink
fix resolve (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
gogonzo authored Nov 20, 2023
1 parent 17ecd1d commit bf1e2d0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# teal 0.14.0.9019
# teal 0.14.0.9020

### New features

Expand Down
2 changes: 1 addition & 1 deletion R/module_nested_tabs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion R/module_teal.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion man/teal_data_to_filtered_data.Rd

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

0 comments on commit bf1e2d0

Please sign in to comment.