datatable_callback: Callback that adds shiny inputs for specific events

Description Usage Arguments Details

View source: R/datatable_callback.R

Description

The output of this function may be used as the callback argument to datatable. Event listeners for dblclick and contextmenu are added to the datatable. These event listeners set a shiny input, so that you can listen to these events on the R-side with observeEvent. See 'Details' for the properties of the added inputs.

Usage

1

Arguments

inputId

Typically the outputId used for displaying the corresponding datatable.

Details

The callback adds the following inputs: input$<inputId>_row_dblclicked and input$<inputId>_row_contextmenued, where <inputId> is replaced by the parameter inputId passed to this function. These inputs have the following properties:

<inputId>_row_dblclicked
row The index of the dblclicked row.
id The value of the first column of the dblclicked row. It is convenient to create unique ids for every row in the first column of a table passed to datatable and hiding this column via the options argument.
data The data of the dblclicked row.
rnd A random number.
<inputId>_row_contextmenued
row The index of the dblclicked row.
id The value of the first column of the dblclicked row. It is convenient to create unique ids for every row in the first column of a table passed to datatable and hiding this column via the options argument.
data The data of the dblclicked row.
mouse A list with elements named x and y holding the position of the mouse in px, when the datatable was contextmenued.
rnd A random number.

DavidBarke/shinyExplorer documentation built on Aug. 28, 2020, 8:54 p.m.