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 does not seem to be working #1501

Closed
duncangates opened this issue Dec 1, 2023 · 1 comment
Closed

opt_interactive does not seem to be working #1501

duncangates opened this issue Dec 1, 2023 · 1 comment
Assignees

Comments

@duncangates
Copy link

Description

I have tested on my local computer, shinyapps.io, and Posit Cloud and have found that opt_interactive currently displays nothing in the table content itself

Reproducible example

From the documentation for gt::opt_interactive()

# install.packages("gt") # if needed
library(gt)

towny |>
  dplyr::select(name, census_div, starts_with("population")) |>
  gt() |>
  fmt_integer() |>
  cols_label_with(fn = function(x) sub("population_", "", x)) |>
  cols_width(
    name ~ px(200),
    census_div ~ px(200)
  ) |>
  tab_header(
    title = "Populations of Municipalities",
    subtitle = "Census values from 1996 to 2021."
  ) |>
  tab_source_note(source_note = md("Data taken from the `towny` dataset.")) |>
  opt_interactive()

Screenshot 2023-11-30 at 5 14 55 PM

Expected result

An interactive table should be created, instead the table appears to have no content asides from the title and subtitle.

Session info

R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3; LAPACK version 3.9.0

locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8
[6] LC_MESSAGES=C.UTF-8 LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

time zone: UTC
tzcode source: system (glibc)

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

other attached packages:
[1] gt_0.10.0

loaded via a namespace (and not attached):
[1] vctrs_0.6.4 cli_3.6.1 rlang_1.1.2 xfun_0.41 generics_0.1.3 jsonlite_1.8.7
[7] glue_1.6.2 markdown_1.11 htmltools_0.5.7 reactR_0.5.0 sass_0.4.7 fansi_1.0.5
[13] tibble_3.2.1 ellipsis_0.3.2 fastmap_1.1.1 yaml_2.3.7 lifecycle_1.0.4 compiler_4.3.2
[19] dplyr_1.1.4 htmlwidgets_1.6.3 pkgconfig_2.0.3 digest_0.6.33 R6_2.5.1 tidyselect_1.2.0
[25] utf8_1.2.4 pillar_1.9.0 commonmark_1.9.0 magrittr_2.0.3 tools_4.3.2 withr_2.5.2
[31] reactable_0.4.4 xml2_1.3.5

@olivroy
Copy link
Collaborator

olivroy commented Dec 1, 2023

Duplicate of #1499.

Updating to htmlwidgets 1.6.4 fixes the issue.

@olivroy olivroy closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
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