diff --git a/NEWS.md b/NEWS.md index 6d4815ce..68e38e08 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,10 @@ * Added new modules `merge_expression_srv` and `merge_expression_module`, updates of `data_merge_srv` and `data_merge_module` (which will be deprecated in future releases) respectively, where `datasets` argument takes a list of (optionally `reactive`) `data.frame` objects and a new argument `join_keys`. +### Miscellaneous + +* Updated `merge_expression_module` so when no variable is selected in data extracts then no filtering is applied. + # teal.transform 0.1.1 ### New features diff --git a/R/merge_expression_module.R b/R/merge_expression_module.R index 6f55d2e6..628aeb36 100644 --- a/R/merge_expression_module.R +++ b/R/merge_expression_module.R @@ -335,8 +335,8 @@ merge_expression_srv <- function(id = "merge_id", merge_fun_name <- if (inherits(merge_function, "reactive")) merge_function() else merge_function check_merge_function(merge_fun_name) - ds <- Filter(Negate(is.null), lapply(selector_list(), function(x) x())) - validate(need(length(ds) > 0, "At least one dataset needs to be selected")) + ds <- Filter(function(e) length(e$select) > 0, lapply(selector_list(), function(x) x())) + validate(need(length(ds) > 0, "Nothing selected")) merge_datasets( selector_list = ds, datasets = datasets,