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

cols_witdth breaks panel-tabset div in quarto #1847

Open
2 tasks done
yannsay-impact opened this issue Aug 20, 2024 · 0 comments
Open
2 tasks done

cols_witdth breaks panel-tabset div in quarto #1847

yannsay-impact opened this issue Aug 20, 2024 · 0 comments

Comments

@yannsay-impact
Copy link

Prework

Description

Using cols_width makes the panel-tabset div act as raw. The tabset div are shown as raw text.
image

Reproducible example (qmd file)

---
title: "repex"
format: html
---
```{r}
library(gt)
```

::: {.panel-tabset}

## Without tabset

gt without tabset.

```{r}
#| results: asis

for (i in 1:2) {
  cat(paste("##", i, "\n"))
  gt::gtcars %>% 
    gt() |> 
    as_raw_html() |> 
    cat()
  
}

```
:::

::: {.panel-tabset}

## With tabset

gt with tabset.

```{r}
#| results: asis

for (i in 1:2) {
  cat(paste("##", i, "\n"))
  gt::gtcars %>% 
    gt() |> 
    cols_width(everything() ~ px(200)) |>
    as_raw_html() |> 
    cat()
}

```

:::

Expected result

Expected results is to have a tabset with the different tables.

image

Session info

End the reproducible example with a call to sessionInfo() in the same session (e.g. reprex(session_info = TRUE)) and include the output.

R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=English_Switzerland.utf8 LC_CTYPE=English_Switzerland.utf8 LC_MONETARY=English_Switzerland.utf8
[4] LC_NUMERIC=C LC_TIME=English_Switzerland.utf8

time zone: Europe/Zurich
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] digest_0.6.36 utf8_1.2.4 R6_2.5.1 fastmap_1.2.0 tidyselect_1.2.1 magrittr_2.0.3
[7] glue_1.7.0 tibble_3.2.1 htmltools_0.5.8.1 pkgconfig_2.0.3 gt_0.11.0 dplyr_1.1.4
[13] generics_0.1.3 lifecycle_1.0.4 xml2_1.3.6 cli_3.6.2 fansi_1.0.6 vctrs_0.6.5
[19] compiler_4.4.0 rstudioapi_0.16.0 tools_4.4.0 pillar_1.9.0 rlang_1.1.4

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

No branches or pull requests

3 participants