glin / reactable

Interactive data tables for R
https://glin.github.io/reactable
Other
627 stars 80 forks source link

Add Option to Only show columns that have coldef #301

Closed sprucemister closed 1 year ago

sprucemister commented 1 year ago

Add Option to Only show columns passed to reactable that have coldef so I don't have to dplyr::select that beforehand before passing to reactable

glin commented 1 year ago

This is an interesting suggestion, and I think something similar has been suggested before. It's also how the JavaScript library works - you have to explicitly specify every column you want to be included. However, early on while using reactable, I found that this was pretty painful in the vast majority of cases, and it was simple enough to use data frame subsetting for when you do want to limit columns.

So for now, I don't think it's worth adding a new option if it won't be used very often (especially since reactable() is already bloated enough), and still recommend data frame subsetting or dplyr::select() to limit columns.

sprucemister commented 1 year ago

Sounds good, Thanks Greg!