Table Module Class
Table.RdTable module that displays data.frame like objects as a table that are
supported by DT::renderDT() and DT::DTOutput().
Details
The Table module exposes reactive bindings from the datatable object from
DT, in bindings field. These bindings are:
cell_clicked
cells_selected
cell_info
rows_current
rows_all
rows_selected
row_last_clicked
columns_selected
search
search_columns
state
These bindings allow you to trigger events with i.e. shiny::observeEvent()
in another module.
For a full description of the exposed bindings, consult the DT
documentation: https://rstudio.github.io/DT/shiny.html
Super class
DarwinShinyModules::ShinyModule -> Table
Active bindings
bindings(
reactiveValues) Reactive bindings forDT::datatable.data(
data.frame) Reactive data, useshiny::isolate()to get the non-reactive data.title(
character) Title of the table.options(
list(n)) List of options used byDT::datatable.filter(
character(1)) Filter option used byDT::datatable.
Methods
Method new()
initialize
Arguments
data(
data.frame) Data to plot with, usually adata.frame-like object.title(
character(1)) Title of the table. When set toNULL, no title is shown.options(
list) table options, by default it shows additional items next to the table like search box, pagination, etc. Only display the table using list(dom = ”)filter(
character:"top") filter option, it can be either"none","bottom"or"top"(default)...Additional parameters to set fields from the
ShinyModuleparent.
Examples
library(DarwinShinyModules)
table <- Table$new(data = mtcars)
if (interactive()) {
  preview(table)
}