I want to limit the number of rows per page in reactable from 10 to 5.
Here is a reproducible sample
set.seed(250)
df <- tibble(x = sample(x = 1:20))
reactable(df)
Right now, when you run this code, there are two pages of 10 rows each. I want four pages of 5 rows each.
CodePudding user response:
You can change the default Page size (10) with the defaultPageSize
argument (https://glin.github.io/reactable/articles/examples.html#pagination)
library(reactable)
set.seed(250)
df <- dplyr::tibble(x = sample(x = 1:20))
reactable(df, defaultPageSize = 5)