Appsilon / reactable.extras

Extra features for reactable package
https://appsilon.github.io/reactable.extras/
41 stars 4 forks source link

[Bug]: groupBy with server-side pagination #46

Open jwijffels opened 11 months ago

jwijffels commented 11 months ago

Guidelines

Project Version

0.2.0

Platform and OS Version

Windows

Existing Issues

No response

What happened?

I'm testing this out to see if using the package makes sense. The groupBy argument shows only the ones on the first page, that is not what you would expect.

Steps to reproduce


> table(mtcars$cyl)

 4  6  8 
11  7 14 
> ui <- fluidPage(
+     reactable_extras_ui(id = "uo_table")
+ )
> server <- function(input, output) {
+     reactable_extras_server(
+         id = "uo_table", 
+         total_pages = ceiling(nrow(mtcars) / 10),
+         data = mtcars,
+         pagination = TRUE,
+         defaultSortOrder = "asc",
+         defaultSorted = c("cyl"),
+         groupBy = "cyl")
+ }
> shinyApp(ui, server)

Expected behavior

You would expect the counts to be right at least if you add a groupBy argument and that if you sort it that it does not sort only the first page.

Attachments

none

Screenshots or Videos

image

Additional Information

none

jakubnowicki commented 11 months ago

Hi @jwijffels, grouping rows is not supported by reactable.extras. We will check if it is possible to incorporate this feature.