Skip to content

opt_interactive() doesn't respect cols_merge() #1785

@olivroy

Description

@olivroy

Description

Merging doesn't happen with interactive html tables.

gt_tbl <- sp500 |>
    dplyr::slice(50:55) |>
    dplyr::select(-volume, -adj_close) |>
    gt::gt() |>
    cols_merge(
        columns = c(open, close),
        pattern = "{1}&mdash;{2}"
    ) |>
    cols_merge(
        columns = c(low, high),
        pattern = "{1}&mdash;{2}"
    ) |>
    cols_label(
        open = "open/close",
        low = "low/high"
    ) 
gt_tbl

image

gt_tbl |> opt_interactive()

image

The colums are properly hidden however.

Expected result

The merged cells to show.

Session info

Latest gt version (0.11.0)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions