customButton {editbl}R Documentation

Generate a custom button for eDT

Description

Generate a custom button for eDT

Usage

customButton(id, label, icon = "", disabled = FALSE)

Arguments

id

character(1), namespaced id

label

character(1)

icon

shiny::icon

disabled

logical. Whether or not the button should start in a disabled state.

Details

Combines elements of shiny::actionButton and datatable options

Value

list to be used in eDT(options = list(buttons = xxx))

Author(s)

Jasper Schelfhout

Examples

if(interactive()){

  ui <- eDTOutput("data")
  server <- function(input,output,session){
    b <- customButton('print', label = 'print')
    eDT_result <- eDT(id = "data", mtcars, options = list(buttons = list("save", b)))
    observeEvent(input$print,{
          print(eDT_result$state())
    })
  }
  shinyApp(ui,server)
}


[Package editbl version 1.0.5 Index]