Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1305 allow delayed data to pass in cs_to_des_select #1306

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
shajoezhu marked this conversation as resolved.
Show resolved Hide resolved
* Fixed bug in creating modules with `delayed_data` and `teal.transform::all_choices`.

# teal.modules.clinical 0.9.1

### Enhancements
Expand Down
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
Loading