downloadableTableUI: downloadableTable UI

Description Usage Arguments Table Features Example Notes Shiny Usage See Also Examples

View source: R/downloadableTable.R

Description

Creates a custom high-functionality table paired with a linked downloadFile button. The table has search and highlight functionality, infinite scrolling, sorting by columns and returns a reactive dataset of selected items.

Usage

1
2
3
4
5
6
7
downloadableTableUI(
  id,
  downloadtypes = c("csv"),
  hovertext = NULL,
  contentHeight = "200px",
  singleSelect = FALSE
)

Arguments

id

character id for the object

downloadtypes

vector of values for data download types

hovertext

download button tooltip hover text

contentHeight

viewable height of the table (any valid css size value)

singleSelect

whether the table should only allow a single row to be selected at a time (FALSE by default allows multi-select).

Table Features

Example

downloadableTableUI("mytableID", c("csv", "tsv"), "Click Here", "300px")

Notes

When there are no rows to download in any of the linked downloaddatafxns the button will be hidden as there is nothing to download. The linked downloaddatafxns are set in the paired callModule (see the Shiny Usage section)

Shiny Usage

Call this function at the place in ui.R where the table should be placed.

Paired with a call to shiny::callModule(downloadableTable, id, ...) in server.R

See Also

downloadableTable

downloadFileButton

Examples

1
2
3
4
5
6
# Inside ui_body.R or ui_sidebar.R
downloadableTableUI("object_id1", 
                    downloadtypes = c("csv", "tsv"), 
                    hovertext = "Download the data here!",
                    contentHeight = "300px",
                    singleSelect = FALSE)

periscope documentation built on July 8, 2020, 7:18 p.m.