From 341bc9159ce315381bfbd2d856b399d4abf0d243 Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Wed, 18 Dec 2024 21:49:45 +0100 Subject: [PATCH 1/3] allow delayed data to pass in cs_to_des_select --- R/utils.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/utils.R b/R/utils.R index f3a4e916f..2661cc194 100644 --- a/R/utils.R +++ b/R/utils.R @@ -300,8 +300,8 @@ cs_to_des_select <- function(cs, dataname, multiple = FALSE, ordered = FALSE, la checkmate::check_class(cs, classes = "choices_selected"), .var.name = cs_name ) - if (!multiple && length(cs$selected) != 1 && !is.null(cs$selected)) { - stop(cs_name, "must only have 1 selected value") + if (!inherits(cs$selected, "delayed_data") && !multiple && length(cs$selected) != 1 && !is.null(cs$selected)) { + stop(cs_name, " must only have 1 selected value") } if (inherits(cs, "choices_selected")) { From 569b90a4f1a38b4c85f4ad9b6a057ffa226b7017 Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Thu, 19 Dec 2024 11:30:19 +0100 Subject: [PATCH 2/3] amend NEWS --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 6ab82c1a4..b7e63ae86 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,9 @@ * Began deprecation cycle for the `show_labels` argument of `template_summary` which has no effect on the `tm_t_summary` module. * Replaced instances of deprecated `strata` argument to `tern::control_lineplot_vars()` with `group_var`. +### Bug FIxes +* Fixed bug in creating modules with `delayed_data` and `teal.transform::all_choices`. + # teal.modules.clinical 0.9.1 ### Enhancements From 190334e4a52bd584a541d294174aa826d3c41edf Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Thu, 19 Dec 2024 19:34:57 +0800 Subject: [PATCH 3/3] Update NEWS.md Signed-off-by: Joe Zhu --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index b7e63ae86..4178e698f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,7 +16,7 @@ * Began deprecation cycle for the `show_labels` argument of `template_summary` which has no effect on the `tm_t_summary` module. * Replaced instances of deprecated `strata` argument to `tern::control_lineplot_vars()` with `group_var`. -### Bug FIxes +### Bug fixes * Fixed bug in creating modules with `delayed_data` and `teal.transform::all_choices`. # teal.modules.clinical 0.9.1