manage_blocks {blockr.core} | R Documentation |
Plugin module for managing board blocks
Description
Logic and user experience for adding/removing blocks to the board can be customized or enhanced by providing an alternate version of this plugin. The default implementation provides a modal-based UI with simple shiny inputs such as drop-downs and text fields.
Usage
manage_blocks(server = manage_blocks_server, ui = manage_blocks_ui)
manage_blocks_server(id, board, update, ...)
manage_blocks_ui(id, board)
Arguments
server , ui |
Server/UI for the plugin module |
id |
Namespace ID |
board |
The initial |
update |
Reactive value object to initiate board updates |
... |
Extra arguments passed from parent scope |
Details
Updates are mediated via the shiny::reactiveVal()
object passed as
update
, where block updates are communicated as list entry blocks
with
components add
and rm
, where
-
add
may beNULL
or ablock
object (block IDs may not already exist), -
rm
may beNULL
or a string (of existing block IDs).
Value
A plugin container inheriting from manage_blocks
is returned by
manage_blocks()
, while the UI component (e.g. manage_blocks_ui()
) is
expected to return shiny UI (i.e. shiny::tagList()
) and the server
component (i.e. manage_blocks_server()
) is expected to return NULL
.