Skip to content

div for interactive html differs between qmd and rmd vignettes #2845

@rkb965

Description

@rkb965

Hi all. Thank you for your patience getting this issue to the correct location. My best guess is that this issue belongs in pkgdown but I am not confident.

General issue: Using gt::opt_interactive() renders appropriately (table displays as expected) in pkgdown::build_site() when my vignette is .Rmd but not when my vignette is .qmd. Both files render appropriately (create interactive tables) when rendered outside of pkgdown, and the other aspects of my quarto vignette render appropriately within pkgdown.

Details: When I have an interactive table in a .qmd, the pkgdown-rendered html contains the table captions, footnotes, etc, but the body of the table is completely missing. When I use the browser's inspector, I see that the gt table in the successfully-rendered htmls (whether rendered from pkgdown of a .Rmd or directly rendered .qmd) has <class="reactable html-widget html-widget-static-bound"> but the unsuccessfully-rendered (file renders but there is no body of the table) table has <class="reactable html-widget">.

I have done this locally on a minimal package. I am using gt 0.11.1, pkgdown 2.1.1, quarto software version 1.6.39, quarto package version 1.4.4, devtools version 2.4.5.9000.

Big thanks for any insights!

I posted this in gt discussions rstudio/gt#1933 but after more digging on my end, I think this does belong as an issue.

Thank you!

---
title: "myvignette"
vignette: >
  %\VignetteIndexEntry{Vignette's Title}
  %\VignetteEngine{quarto::html}
  %\VignetteEncoding{UTF-8}
---

```{r setup}
library(testgtint)
library(gt)
```

```{r}
gt(mtcars) |> 
  opt_interactive()
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions