Skip to content

Commit

Permalink
Show focus columns in header
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Apr 30, 2022
1 parent dcaa58d commit 541712d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/tbl-format-header.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ tbl_format_header <- function(x, setup, ...) {
#' @export
tbl_format_header.tbl <- function(x, setup, ...) {
named_header <- setup$tbl_sum
focus <- attr(x, "pillar_focus")
if (!is.null(focus)) {
named_header <- c(named_header, "Focus columns" = collapse(tick_if_needed(focus)))
}

if (all(names2(named_header) == "")) {
header <- named_header
Expand Down

0 comments on commit 541712d

Please sign in to comment.