Skip to content

Commit

Permalink
provide source data as a dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
elong0527 committed Apr 11, 2024
1 parent 729c6ee commit e48b160
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/reactable2.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ reactable2 <- function(data,
if (download) {
on_click <- paste0("Reactable.downloadDataCSV('", element_id, "')")

htmltools::browsable(
tbl <- htmltools::browsable(
htmltools::tagList(
htmltools::tags$button("Download as CSV", onclick = on_click),
tbl
)
)
} else {
tbl
}
attr(tbl, "data") <- tbl$data

}

#' Convert reactable to a data frame
Expand Down

0 comments on commit e48b160

Please sign in to comment.