Skip to content

A bare R wrapper to the DataTables library including an open cell editor.

Notifications You must be signed in to change notification settings

LukasK13/editable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

editable

A R Shiny wrapper to the DataTables library including an open source cell editor. All other arguments are passed to the DataTable library according to: https://datatables.net/reference/option/

Install by executing devtools::install_github("LukasK13/editable") in the R console.

Example usage:

library(shiny)
library(editable)

ui <- fluidPage(
  titlePanel("Editable Table"),
  editableOutput("Table")
)

server <- function(input, output) {
  output$Table = renderEditable(iris, editType = list(Sepal.Length = "text", Sepal.Width = "text", Petal.Length = "text",
                                                                 Petal.Width = "text", Species = "select"),
                                editAttribs = list(Sepal.Length = list(placeholder = "Length"), Sepal.Width = list(placeholder = "Width"),
                                                   Petal.Length = list(placeholder = "Length"), Petal.Width = list(placeholder = "Width"),
                                                   Species = list(options = c("setosa", "versicolor", "virginica"))),
                                order = list(), rownames = F, checkboxSelect = T)
  
  observeEvent(input$Table_selection, {
    print(input$Table_selection)
  })
  
  observeEvent(input$Table_cellEdited, {
    print(input$Table_cellEdited)
  })
}

shinyApp(ui = ui, server = server)

About

A bare R wrapper to the DataTables library including an open cell editor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published