Title: | Extra Features for 'reactable' Package |
---|---|
Description: | Enhanced functionality for 'reactable' in 'shiny' applications, offering interactive and dynamic data table capabilities with ease. With 'reactable.extras', easily integrate a range of functions and components to enrich your 'shiny' apps and facilitate user-friendly data exploration. |
Authors: | Recle Vibal [aut, cre], Ivan Hrychaniuk [aut], Andres Quintero [aut], Pedro Silva [aut], Eduardo Almeida [ctb], Appsilon Sp. z o.o. [cph] |
Maintainer: | Recle Vibal <[email protected]> |
License: | LGPL-3 |
Version: | 0.2.1 |
Built: | 2024-10-30 09:25:55 UTC |
Source: | CRAN |
Button input for reactable column cell
button_extra(id, key = NULL, ...)
button_extra(id, key = NULL, ...)
id |
id of the button input |
key |
alternative unique id for server side processing |
... |
parameters of button, only |
Custom JS button renderer for reactable
reactable::colDef(cell = button_extra("click", class = "table-button"))
reactable::colDef(cell = button_extra("click", class = "table-button"))
Checkbox input for reactable column cell
checkbox_extra(id, key = NULL, ...)
checkbox_extra(id, key = NULL, ...)
id |
id of the checkbox input |
key |
alternative unique id for server side processing |
... |
parameters of checkbox, only |
Custom JS checkbox renderer for reactable
reactable::colDef(cell = checkbox_extra("check", class = "table-check"))
reactable::colDef(cell = checkbox_extra("check", class = "table-check"))
Date input for reactable column cell
date_extra(id, key = NULL, ...)
date_extra(id, key = NULL, ...)
id |
id of the date input |
key |
alternative unique id for server side processing |
... |
parameters of date input, only |
Custom JS date input renderer for reactable
reactable::colDef(cell = date_extra("date", class = "table-date"))
reactable::colDef(cell = date_extra("date", class = "table-date"))
Select input for reactable column cell
dropdown_extra(id, choices, key = NULL, ...)
dropdown_extra(id, choices, key = NULL, ...)
id |
id of the select input |
choices |
vector of choices |
key |
alternative unique id for server side processing |
... |
parameters of date input, only |
Custom JS dropdown renderer for reactable
reactable::colDef( cell = dropdown_extra("dropdown", choices = letters[1:5], class = "table-dropdown" ) )
reactable::colDef( cell = dropdown_extra("dropdown", choices = letters[1:5], class = "table-dropdown" ) )
Reactable.extras JS and CSS dependencies
reactable_extras_dependency()
reactable_extras_dependency()
HTML dependency object.
Create reactable UI with server-side processing
reactable_extras_ui(id, width = "auto", height = "auto") reactable_extras_server(id, data, total_pages = 4, sortable = TRUE, ...)
reactable_extras_ui(id, width = "auto", height = "auto") reactable_extras_server(id, data, total_pages = 4, sortable = TRUE, ...)
id |
element id |
width , height
|
CSS unit ( |
data |
passed to |
total_pages |
number of pages |
sortable |
allow sorting by columns |
... |
other arguments to be passed to |
Arguments passed to reactable::reactable()
must not contain pagination
or showPagination
.
These are set to FALSE
. Pagination will be handled on the server-side.
reactable_extras_ui()
returns a custom UI for a server-side processed reactable
if (interactive()) { library(shiny) library(reactable) library(reactable.extras) shinyApp( reactable_extras_ui("big_data"), function(input, output, server) { reactable_extras_server( "big_data", data = mtcars, columns = list( mpg = reactable::colDef(name = "Miles per Gallon"), cyl = reactable::colDef(name = "Cylinders"), disp = reactable::colDef(name = "Displacement") ) ) } ) }
if (interactive()) { library(shiny) library(reactable) library(reactable.extras) shinyApp( reactable_extras_ui("big_data"), function(input, output, server) { reactable_extras_server( "big_data", data = mtcars, columns = list( mpg = reactable::colDef(name = "Miles per Gallon"), cyl = reactable::colDef(name = "Cylinders"), disp = reactable::colDef(name = "Displacement") ) ) } ) }
Text input for reactable column cell
text_extra(id, key = NULL, ...)
text_extra(id, key = NULL, ...)
id |
id of the text input |
key |
alternative unique id for server side processing |
... |
parameters of text input, only |
Custom JS text input renderer for reactable
reactable::colDef(cell = text_extra("text", class = "table-text"))
reactable::colDef(cell = text_extra("text", class = "table-text"))
Tool-tip for table headers
tooltip_extra(content, theme = "light")
tooltip_extra(content, theme = "light")
content |
The content to be displayed in the tool-tip |
theme |
The theme of the tool-tip, either "light", "light-border", "material" or "translucent" |
Custom JS tool-tip renderer for reactable
reactable::colDef(header = tooltip_extra("This is my tool-tip", theme = "material"))
reactable::colDef(header = tooltip_extra("This is my tool-tip", theme = "material"))