sortableTableOutput: Create a table output element with sortable rows

Description Usage Arguments Value See Also Examples

View source: R/sortableTableOutput.R

Description

Render a standard HTML table with table rows sortable by drag and drop. The order of table rows is recorded in input$<outputId>_order.

Usage

1

Arguments

outputId

output variable to read the table from

Value

A table output element that can be included in a panel

See Also

shiny::tableOutput, sortableRadioButtons, sortableCheckboxGroupInput, sortableTabsetPanel, selectableTableOutput

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Only run this example in interactive R sessions
if (interactive()) {
  shinyApp(
    ui = fluidPage(
      verbatimTextOutput("rows"),
      sortableTableOutput("tbl")
    ),
    server = function(input, output) {
      output$rows <- renderPrint({input$tbl_row_index})
      output$tbl <- renderTable(mtcars, rownames = TRUE)
    }
  )
}

shinyjqui documentation built on Feb. 23, 2021, 9:06 a.m.