Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
olivroy opened this issue Jul 15, 2024 · 0 comments · Fixed by #1786
Closed

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

olivroy opened this issue Jul 15, 2024 · 0 comments · Fixed by #1786

Comments

@olivroy
Copy link
Collaborator

olivroy commented Jul 15, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants