Package 'reactable.extras'

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

Help Index


Button input for reactable column cell

Description

Button input for reactable column cell

Usage

button_extra(id, key = NULL, ...)

Arguments

id

id of the button input

key

alternative unique id for server side processing

...

parameters of button, only class is supported for now

Value

Custom JS button renderer for reactable

Examples

reactable::colDef(cell = button_extra("click", class = "table-button"))

Checkbox input for reactable column cell

Description

Checkbox input for reactable column cell

Usage

checkbox_extra(id, key = NULL, ...)

Arguments

id

id of the checkbox input

key

alternative unique id for server side processing

...

parameters of checkbox, only class is supported for now

Value

Custom JS checkbox renderer for reactable

Examples

reactable::colDef(cell = checkbox_extra("check", class = "table-check"))

Date input for reactable column cell

Description

Date input for reactable column cell

Usage

date_extra(id, key = NULL, ...)

Arguments

id

id of the date input

key

alternative unique id for server side processing

...

parameters of date input, only class is supported for now

Value

Custom JS date input renderer for reactable

Examples

reactable::colDef(cell = date_extra("date", class = "table-date"))

Reactable.extras JS and CSS dependencies

Description

Reactable.extras JS and CSS dependencies

Usage

reactable_extras_dependency()

Value

HTML dependency object.


Create reactable UI with server-side processing

Description

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.

Value

reactable_extras_ui() returns a custom UI for a server-side processed reactable

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")
        )
      )
    }
  )
}

Text input for reactable column cell

Description

Text input for reactable column cell

Usage

text_extra(id, key = NULL, ...)

Arguments

id

id of the text input

key

alternative unique id for server side processing

...

parameters of text input, only class is supported for now

Value

Custom JS text input renderer for reactable

Examples

reactable::colDef(cell = text_extra("text", class = "table-text"))

Tool-tip for table headers

Description

Tool-tip for table headers

Usage

tooltip_extra(content, theme = "light")

Arguments

content

The content to be displayed in the tool-tip

theme

The theme of the tool-tip, either "light", "light-border", "material" or "translucent"

Value

Custom JS tool-tip renderer for reactable

Examples

reactable::colDef(header = tooltip_extra("This is my tool-tip", theme = "material"))