Skip to content
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

Expand rows by any column, not all #314

Open
bikeactuary opened this issue Feb 20, 2023 · 2 comments
Open

Expand rows by any column, not all #314

bikeactuary opened this issue Feb 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@bikeactuary
Copy link

cross-posting for visibility

I want to see column "val" according to colA and time, without expanding/seeing values of colB (value is summed over the categories within this column). But also leaving colB in the table for user to optionally expand for the finer detail. Is this possible?

dat <- data.frame(colA = c(rep("Yes", 20,), rep("No", 20)),
                  colB = rep(c(letters[1:5]), 4)) %>%
  arrange(colA, colB) %>%
  mutate(time = rep(1:4, 10),
         val = runif(40))

reactable(dat,
  groupBy = c("colA", "colB"),
  columns = list(
    val = colDef(aggregate = "sum")
  ),
  bordered = TRUE)
@glin
Copy link
Owner

glin commented Feb 21, 2023

Coincidentally, I just answered pretty much the same question in a different issue! Copying my response from #268 (comment):

expansion is either all or nothing right now due to prior technical limitations. I've never thought of limiting expansion to certain columns (or I guess nesting level) though, and I think that's a really great idea.

So this isn't possible right now, but I'll tag it as a feature request to look at whenever I revisit default row expansion.

@glin glin added the enhancement New feature or request label Feb 21, 2023
@bikeactuary
Copy link
Author

Thx - subscribing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants