Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] 2025-12-09

### Updated
- The key metrics table is now in long format to avoid horizontal scrolling with high number of samples.
- The key metrics table is now in long format to avoid horizontal scrolling with high number of samples. Pagination has also been added to prevent very long tables from being displayed.

### Fixed
- The ES now tolerates chunk errors and will in most cases render a report even if some chunks fail.
Expand Down
3 changes: 2 additions & 1 deletion R/key_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ key_metric_table <-
table_content %>%
style_table(
escape = FALSE,
tooltips = TRUE
tooltips = TRUE,
pageLength = 10
)
}

Expand Down
14 changes: 11 additions & 3 deletions R/tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ style_table <- function(
pixelatorR:::assert_single_value(buttons, "bool")

# Options
opts <- list(pageLength = ifelse(is.null(pageLength), nrow(df), pageLength))
opts <- list(
pageLength = ifelse(is.null(pageLength), nrow(df), pageLength)
)

dom <- ""

Expand Down Expand Up @@ -103,16 +105,22 @@ style_table <- function(
")
}


opts$dom <- dom

# Build extensions list
extensions <- c()
if (buttons) extensions <- c(extensions, "Buttons")
if (length(extensions) == 0) extensions <- list()

table_widget <- DT::datatable(
df,
caption = caption,
rownames = FALSE,
escape = escape,
options = opts,
extensions = if (buttons) "Buttons" else list(),
extensions = extensions,
class = "display compact",
width = "100%",
...
)

Expand Down