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

Fix Selector Initialization Issue When Invoked from Another Module #3

Merged
merged 10 commits into from
Aug 13, 2024
3 changes: 3 additions & 0 deletions R/dressing_room.R
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,11 @@ app_creator_feedback_server <- function(id, warning_messages, error_messages, ui
if (length(error_messages()) == 0) res <- append(res, list(ui))
return(res)
})
shiny::outputOptions(output, "ui", suspendWhenHidden = FALSE)
}
)



return(module)
}
6 changes: 6 additions & 0 deletions R/mod_patient_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,25 @@ mod_patient_profile_server <- function(id, subject_level_dataset, extra_datasets
)
)
}
message("PAPO UI")
return(res)
})

shiny::outputOptions(output, "ui", suspendWhenHidden = FALSE)

output[["selector"]] <- shiny::renderUI({
subject_level_dataset <- subject_level_dataset()
shiny::req(subject_level_dataset, cancelOutput = TRUE)
message("PAPO SELECTOR")
shiny::selectInput(ns("patient_selector"),
label = "Select Patient ID:",
selected = input[["patient_selector"]],
choices = unique(subject_level_dataset[[subjid_var]])
)
})

shiny::outputOptions(output, "selector", suspendWhenHidden = FALSE)

# change selected patient based on sender_ids
if (!is.null(sender_ids)) {
lapply(sender_ids, function(x) {
Expand Down
Loading