When using the gt
package, spanners spanners disappear when I make the table interactive with opt_interactive()
. Is there a workaround for this?
As a simple example, I use mtcars with an intended spanner. When created without interactivity the spanner displays, when created with interactivity the spanner disappears.
library(gt)
## works fine:
mtcars |>
gt() |>
tab_spanner(label = "example",
columns = c(mpg, cyl))
## spanner gone:
mtcars |>
gt() |>
tab_spanner(label = "example",
columns = c(mpg, cyl)) |>
opt_interactive()
New contributor
user25719676 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.