-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export buttons #11
Comments
Yes, I agree. It would be great to have the export buttons as well. |
I agree. This appears to be the only feature missing from DT that I regular use. |
Agreed it'd be useful as well. React Table doesn't support this out of the box, but it wouldn't too difficult to implement. Or at least provide a way to add custom buttons with access to the table instance/data, so users could do whatever they want (exporting, copying, etc.). |
Looking forward to it! I will update some of my shiny apps from {DT} to {reactable} once this is available.. I really love some of the functionalities here |
Amazing work on this package! And like @fmmattioni, I plan on migrating most of my dashboards over once this is aligned. |
Congratulations on this package. It´s amazing. I am migrating all my DT to reactable. When would it be possible to have the buttons to export the data? Thank you and congratulations for this work. |
@DiegoConde take a look at the package I created that you can easily implement download buttons in your rmarkdown :) |
Thanks a lot, |
This feature would be nice too. I have recently moved away from |
This is now possible to do in the development version (0.2.3.9000) using the new JavaScript API:
There's no built-in export button, but instead, a You can use this to implement your own CSV download button and style it however you want. The most basic download button could be one line of code: library(reactable)
library(htmltools)
htmltools::browsable(
tagList(
tags$button("Download as CSV", onclick = "Reactable.downloadDataCSV('cars-table', 'cars.csv')"),
reactable(MASS::Cars93[, 1:5], elementId = "cars-table")
)
) Or if you wanted to reuse this download button in other tables, you could write a function for it: library(reactable)
library(htmltools)
csvDownloadButton <- function(tableId, label = "Download as CSV", filename = "data.csv") {
htmltools::tags$button(
label,
onclick = sprintf("Reactable.downloadDataCSV('%s', '%s')", tableId, filename)
)
}
htmltools::browsable(
tagList(
csvDownloadButton("cars-table", "Download as CSV", filename = "cars.csv"),
reactable(MASS::Cars93[, 1:5], elementId = "cars-table")
)
) For a working demo, check out the CSV download button example in the docs. For more details on how to use the JavaScript API, check out the the JavaScript API guide and reference. And for more details on using the |
huuuuge! awesome work @glin |
Hello, |
Hi @dsolito! I am facing the same issue. Have you found a solution for that? |
@dsolito @xanderwallace85 Do you have the latest development version (v0.2.3.9000) installed from GitHub? The version on CRAN (v0.2.3) doesn't have this feature yet. |
Fantastic package! Is it possible to have export buttons as {DT} does?
https://rstudio.github.io/DT/extensions.html#buttons
The text was updated successfully, but these errors were encountered: