A button that triggers 'load_data' event, which runs
scripts registered via set_script with
binding_event = "load_data" (see module_server_common);
the same script can be triggered programmatically via
trigger_script.
Usage
load_data_button(
label = "Load data",
icon = NULL,
width = NULL,
type = "primary",
btn_type = c("button", "link"),
class = "",
style = "",
...
)Examples
# In loader UI
load_data_button("Load subject", width = "100%")
#> <button class="btn btn-primary rave-button" style="width: 100%;" type="button" rave-action="{"type": "load_data"}">
#>
#> Load subject
#> </button>
# In loader server function
if (FALSE) { # \dontrun{
server_tools <- get_default_handlers(session = session)
server_tools$set_script(
"load_data",
{
# load data ...
},
binding_event = "load_data",
dispatch_event = "data_changed",
alert_params = list(title = "Loading in progress")
)
} # }