update_tableau_settings_async.Rd
Call update_tableau_settings_async()
from an extension's config_server
function to write settings that can be read, now and in the future, by
tableau_setting()
.
update_tableau_settings_async(
...,
add. = FALSE,
session. = shiny::getDefaultReactiveDomain()
)
... | Settings to be persisted, as named arguments. The value should be
suitable for encoding as JSON using |
---|---|
add. | A logical ( |
session. | The Shiny |
A promises::promise object. See Details.
While the settings reading functions---tableau_setting()
and
tableau_settings_all()
---are reactive, update_tableau_settings_async()
is
not. Calling it does not cause any reactive dependencies to be taken.
As implied by the function name, update_tableau_settings_async()
does its
work asynchronously (as the actual
persisting of settings must happen through the Tableau Extension API in the
web browser, not directly in R). You can usually ignore this fact, except
that you should ensure that if this function is being called from within an
observe()
or observeEvent()
, that the promise object it returns is the
return value of the observer code block. (This is to alert Shiny to the fact
that this observer can't really be considered done with its execution until
the update_tableau_settings_async()
task is completely finished.)