Create reactable UI with server-side processing
Source:R/reactable-server.R
reactable-extras-server.Rd
Create reactable UI with server-side processing
Usage
reactable_extras_ui(id, width = "auto", height = "auto")
reactable_extras_server(id, data, total_pages = 4, sortable = TRUE, ...)
Arguments
- id
element id
- width, height
CSS unit (
"100%"
,"400px"
, or"auto"
), numeric for number of pixels- data
passed to
reactable::reactable()
- total_pages
number of pages
- sortable
allow sorting by columns
- ...
other arguments to be passed to
reactable::reactable()
Details
Arguments passed to reactable::reactable()
must not contain pagination
or showPagination
.
These are set to FALSE
. Pagination will be handled on the server-side.
Examples
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")
)
)
}
)
}