@@ -88,9 +88,9 @@ mod_patient_profile_server <- function(id, subject_level_dataset, extra_datasets
8888 return (res )
8989 })
9090
91- # (ag4hj): Without these outputOptions the update selector (See: ag4hj) tries to update a selector that is not yet
92- # in the UI. Therefore the update is lost. In practice this means that when using the receiver_ids the first
93- # subjid is lost and the interaction is incorrect.
91+ # (# ag4hj): Without these outputOptions the update selector tries to update a selector that is not yet in the UI.
92+ # Therefore the update is lost. In practice this means that when using the receiver_ids the first subjid is lost
93+ # and the interaction is incorrect.
9494 shiny :: outputOptions(output , " ui" , suspendWhenHidden = FALSE )
9595
9696 output [[" selector" ]] <- shiny :: renderUI({
@@ -103,25 +103,23 @@ mod_patient_profile_server <- function(id, subject_level_dataset, extra_datasets
103103 )
104104 })
105105
106- # See: (ag4hj)
106+ # See: (# ag4hj)
107107 shiny :: outputOptions(output , " selector" , suspendWhenHidden = FALSE )
108108
109- # See: (ag4hj)
109+ # See: (# ag4hj)
110110 # change selected patient based on sender_ids
111- if (! is.null(sender_ids )) {
112- lapply(sender_ids , function (x ) {
113- shiny :: observeEvent(x()[[" subj_id" ]](), {
114- pid_passed <- x()[[" subj_id" ]]()
115- if (! identical(pid_passed , character (0 ))) {
116- shiny :: updateSelectInput(
117- session = session ,
118- inputId = " patient_selector" ,
119- selected = pid_passed
120- )
121- }
122- })
111+ lapply(sender_ids , function (x ) {
112+ shiny :: observeEvent(x()[[" subj_id" ]](), {
113+ pid_passed <- x()[[" subj_id" ]]()
114+ if (! identical(pid_passed , character (0 ))) {
115+ shiny :: updateSelectInput(
116+ session = session ,
117+ inputId = " patient_selector" ,
118+ selected = pid_passed
119+ )
120+ }
123121 })
124- }
122+ })
125123
126124 assert <- function (condition , message ) shiny :: validate(shiny :: need(condition , message ))
127125
0 commit comments