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

Set outputOtions at assignment #4031

Open
calderonsamuel opened this issue Apr 18, 2024 · 0 comments
Open

Set outputOtions at assignment #4031

calderonsamuel opened this issue Apr 18, 2024 · 0 comments

Comments

@calderonsamuel
Copy link

Currently this works (in this order):

output$some_ui<- renderUI({ ... })

outputOptions(output, "some_ui", suspendWhenHidden = FALSE)

And this also works:

observe(outputOptions(output, "some_ui", suspendWhenHidden = FALSE))

output$some_ui<- renderUI({ ... })

In both cases, the assignment and the setting of options need to happen in different places (also outputOptions() looks like a loose side effect).

Proposal

This could become:

output$some_ui<- renderUI({ ... }) |>
  setOutputOption(suspendWhenHidden = FALSE)

Which seems inline with recent additions such as bindEvent() and bindCache().

Or could be:

output$some_ui<- renderUI({ ... }, outputOptions = list(suspendWhenHidden = FALSE))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant