View source: R/downloadableTable.R
downloadableTableUI | R Documentation |
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.
downloadableTableUI(
id,
downloadtypes = c("csv"),
hovertext = NULL,
contentHeight = "200px",
singleSelect = FALSE
)
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). |
Consistent styling of the table
downloadFile module button functionality built-in to the table
Ability to show different data from the download data
Table is automatically fit to the window size with infinite y-scrolling
Table search functionality including highlighting built-in
Multi-select built in, including reactive feedback on which table items are selected
downloadableTableUI("mytableID", c("csv", "tsv"),
"Click Here", "300px")
When there are no rows to download in any of the linked downloaddatafxns the button will be hidden as there is nothing to download.
Call this function at the place in ui.R where the table should be placed.
Paired with a call to downloadableTable(id, ...)
in server.R
downloadableTable
downloadFileButton
# Inside ui_body.R or ui_sidebar.R
downloadableTableUI("object_id1",
downloadtypes = c("csv", "tsv"),
hovertext = "Download the data here!",
contentHeight = "300px",
singleSelect = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.