-
Notifications
You must be signed in to change notification settings - Fork 24
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
Allow modules to return a value and access each other's value. #707
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,17 +77,22 @@ safetyGraphicsServer <- function(input, output, session, | |
shinyjs::hide(selector = paste0(".navbar li a[data-value='profile']")) | ||
shinyjs::hide(selector = paste0(".navbar #pt-header")) | ||
} | ||
|
||
#--- Charts tab ---# | ||
charts %>% purrr::walk( | ||
~callModule( | ||
module=chartsNav, | ||
id=.x$name, | ||
chart=.x, | ||
data=filtered_data, | ||
mapping=current_mapping | ||
) | ||
) | ||
module_outputs <- reactiveValues() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
charts %>% | ||
purrr::walk(function(chart) { | ||
module_output <- callModule( | ||
module=chartsNav, | ||
id=chart$name, | ||
chart=chart, | ||
data=filtered_data, | ||
mapping=current_mapping, | ||
module_outputs=module_outputs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deleted the |
||
) | ||
|
||
module_outputs[[ chart$name ]] <- module_output | ||
}) | ||
|
||
#--- Settings tab ---# | ||
callModule( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is anything actually being returned here for non-shiny charts? I guess in theory the
main
function could return something, but is this just NULL for now?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, nothing now... I can imagine returning a filtered/transformed dataset or a population subset.