add_callback: Add a callback to a Dash app

View source: R/callbacks-advanced.R

add_callbackR Documentation

Add a callback to a Dash app

Description

Add a callback to a Dash app

Usage

add_callback(app, outputs, params, callback)

Arguments

app

A dash application created with dash_app().

outputs

Unnamed list. The output argument provides the component id and property which will be updated by the callback; a callback can target one or more outputs (i.e. multiple outputs).

params

Unnamed list; provides input and state statements, each with its own defined id and property. For pattern-matching callbacks, the id field of a component is written in JSON-like syntax and provides fields that are arbitrary keys which describe the targets of the callback. See selectors for more details.

callback

Function; must return output provided input or state arguments. callback may be any valid R function, or a character string containing valid JavaScript, or a call to clientsideFunction, including namespace and function_name arguments for a locally served JavaScript function.


dash documentation built on June 23, 2022, 9:11 a.m.