Open
Conversation
16 tasks
Contributor
Code Coverage SummaryDiff against mainResults for commit: 6d150fd Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Contributor
Unit Tests Summary 1 files 24 suites 6s ⏱️ Results for commit 6d150fd. ♻️ This comment has been updated with latest results. |
gogonzo
reviewed
Mar 19, 2024
Contributor
gogonzo
left a comment
There was a problem hiding this comment.
Almost there. Please change filter variable in the encoding panel and see what happens - filter value is not restored properly
pkgload::load_all("teal.modules.general")
pkgload::load_all("teal.transform")
pkgload::load_all("teal")
data <- teal_data()
data <- within(data, {
require(nestcolor)
ADSL <- rADSL
})
datanames(data) <- "ADSL"
join_keys(data) <- default_cdisc_join_keys[datanames(data)]
app <- init(
data = data,
modules = modules(
tm_g_association(
ref = data_extract_spec(
dataname = "ADSL",
filter = filter_spec(vars = choices_selected(variable_choices("ADSL"), "SEX")),
select = select_spec(
label = "Select variable:",
choices = variable_choices(
data[["ADSL"]],
c("SEX", "RACE", "COUNTRY", "ARM", "STRATA1", "STRATA2", "ITTFL", "BMRKR2")
),
selected = "RACE",
fixed = FALSE
)
),
vars = data_extract_spec(
dataname = "ADSL",
select = select_spec(
label = "Select variables:",
choices = variable_choices(
data[["ADSL"]],
c("SEX", "RACE", "COUNTRY", "ARM", "STRATA1", "STRATA2", "ITTFL", "BMRKR2")
),
selected = "BMRKR2",
multiple = TRUE,
fixed = FALSE
)
),
ggplot2_args = ggplot2_args(
labs = list(subtitle = "Plot generated by Association Module")
)
)
)
)
shinyApp(app$ui, app$server)…ring/teal.transform into 898_save_app_state3@main
Part of the PR #207 Triggering the reactivity using `observeEvent` Example to test: ```r pkgload::load_all("../teal.modules.general") pkgload::load_all("../teal.transform") pkgload::load_all("../teal") pkgload::load_all("../teal.widgets") data <- teal_data() data <- within(data, { require(nestcolor) ADSL <- rADSL ADSL$SEX2 <- rADSL$SEX }) datanames(data) <- "ADSL" join_keys(data) <- default_cdisc_join_keys[datanames(data)] app <- init( data = data, modules = modules( tm_g_association( ref = data_extract_spec( dataname = "ADSL", filter = filter_spec(vars = choices_selected(variable_choices("ADSL"), "SEX")), select = select_spec( label = "Select variable:", choices = variable_choices( data[["ADSL"]], c("SEX", "RACE", "COUNTRY", "ARM", "STRATA1", "STRATA2", "ITTFL", "BMRKR2") ), selected = "RACE", fixed = FALSE ) ), vars = data_extract_spec( dataname = "ADSL", select = select_spec( label = "Select variables:", choices = variable_choices( data[["ADSL"]], c("SEX", "RACE", "COUNTRY", "ARM", "STRATA1", "STRATA2", "ITTFL", "BMRKR2") ), selected = "BMRKR2", multiple = TRUE, fixed = FALSE ) ), ggplot2_args = ggplot2_args( labs = list(subtitle = "Plot generated by Association Module") ) ) ) ) shinyApp(app$ui, app$server) ```
gogonzo
reviewed
Mar 21, 2024
| inputId = ns("vals"), | ||
| label = filter$label, | ||
| choices = vals_options()$choices, | ||
| selected = vals_options()$selected, |
Contributor
There was a problem hiding this comment.
no need to rerender when selecting vals
Suggested change
| selected = vals_options()$selected, | |
| selected = isolate(vals_options()$selected), |
Contributor
There was a problem hiding this comment.
I think there is no point in isolating here for two reasons:
- This isolate does not isolate, because the reactivity is triggered by
vals_options()which is used in the line abovevals_options()$choices - The
vals_options()is only dependent oninput$coland we want the input ofvalsto render on changes made toinput$col.
Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com> Signed-off-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to insightsengineering/teal#1011
Replaces uses of
update*Inputwith server-side input creation withrenderUI.