Extra features for reactable package
reactable.extras
is an R package that enhances the functionality of the reactable package in Shiny applications. Reactable tables are interactive customizable, and reactable.extras
extend their capabilities, allowing you to create dynamic and interactive data tables with ease.
In the context of web apps, you often need to provide users with additional tools and interactivity for data exploration. reactable.extras
address this need by offering a set of functions and components that can be seamlessly integrated into your Shiny apps.
Stable version:
Development version:
Getting started with reactable.extras
is straightforward:
{reactable}
. It’s required to be at least on version 0.4.0library(shiny)
library(reactable)
library(reactable.extras)
data <- data.frame(
ID = 1:1000,
SKU_Number = paste0("SKU ", 1:1000),
Actions = rep(c("Updated", "Initialized"), times = 20),
Registered = as.Date("2023/1/1")
)
ui <- fluidPage(
# Include reactable.extras in your UI
reactable_extras_dependency(),
reactableOutput("my_table")
)
server <- function(input, output, session) {
output$my_table <- renderReactable({
# Create a reactable table with enhanced features
reactable(
data,
columns = list(
ID = colDef(name = "ID"),
SKU_Number = colDef(name = "SKU_Number"),
Actions = colDef(
name = "Actions",
cell = button_extra("button", class = "btn btn-primary")
),
Registered = colDef(
cell = date_extra("Registered", class = "date-extra")
)
)
)
})
observeEvent(input$button, {
showModal(modalDialog(
title = "Selected row data",
reactable(data[input$button$row, ])
))
})
}
shinyApp(ui, server)
If you want to contribute to this project please submit a regular PR, once you’re done with new feature or bug fix.
Reporting a bug is also helpful - please use GitHub issues and describe your problem as detailed as possible.
Appsilon is a Posit (formerly RStudio) Full Service Certified Partner.
Learn more at appsilon.com.
Get in touch opensource@appsilon.com
Explore the Rhinoverse - a family of R packages built around Rhino!