Skip to content

[Bug]: Filter feature may not be compatible with bslib >=0.11.0 #1714

Description

@fengc1996-byte

What happened?

The teal filter feature does not work if I upgrades bslib to 0.11.0. I did a test of calling the same code(pasted below) with bslib 0.11.0 v.s. 0.10.0, and found it's the dependency package that caused the difference.

As snapshot shows below. The filtering below 'ADSL' will not expand after clicking.
Image

Code used for testing. Very basic one.

library(teal)
library(teal.modules.general)

demo_data <- cdisc_data()
demo_data <- within(demo_data, {
  ADSL <- data.frame(
    USUBJID = paste0("SUBJ", sprintf("%03d", 1:20)),
    AGE = c(25, 35, 45, 55, 65, 75, 30, 40, 50, 60,
            28, 38, 48, 58, 68, 32, 42, 52, 62, 72),
    SEX = as.factor(rep(c("M", "F"), 10)),
    ARM = as.factor(rep(c("Placebo", "Treatment"), each = 10)),
    SAFFL = "Y"
  )
  
  ADAE <- data.frame(
    USUBJID = rep(ADSL$USUBJID[1:15], each = 2),  # Only first 15 subjects have AEs
    AESEQ = rep(1:2, 15),
    AEDECOD = sample(c("Headache", "Nausea", "Fatigue"), 30, replace = TRUE),
    AESEV = as.factor(sample(c("MILD", "MODERATE"), 30, replace = TRUE))
  )
})

app <- teal::init(
  data = demo_data,
  modules = teal::modules(
    tm_data_table(
      label = "ADSL Data",
      dataname = "ADSL"
    ),
    tm_data_table(
      label = "ADAE Data",
      dataname = "ADAE"
    )
  )
)
  
shiny::shinyApp(app$ui, app$server)

sessionInfo()

R version 4.5.2 (2025-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: Asia/Hong_Kong
tzcode source: internal

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

other attached packages:
 [1] DT_0.34.0                  dplyr_1.2.1                teal.modules.general_0.6.0
 [4] teal.transform_0.7.1       ggplot2_4.0.3              teal_1.1.0                
 [7] teal.slice_0.7.1           teal.data_0.8.0            teal.code_0.7.1           
[10] shiny_1.13.0              

loaded via a namespace (and not attached):
 [1] sass_0.4.10           generics_0.1.4        teal.reporter_0.6.1   digest_0.6.39        
 [5] magrittr_2.0.5        evaluate_1.0.5        grid_4.5.2            RColorBrewer_1.1-3   
 [9] fastmap_1.2.0         jsonlite_2.0.0        backports_1.5.1       promises_1.5.0       
[13] crosstalk_1.2.2       scales_1.4.0          jquerylib_0.1.4       textshaping_1.0.5    
[17] cli_3.6.6             rlang_1.2.0           yaml_2.3.12           remotes_2.5.0        
[21] withr_3.0.2           cachem_1.1.0          otel_0.2.0            tools_4.5.2          
[25] memoise_2.0.1         checkmate_2.3.4       httpuv_1.6.17         teal.widgets_0.6.0   
[29] vctrs_0.7.3           logger_0.4.2          R6_2.6.1              mime_0.13            
[33] lifecycle_1.0.5       htmlwidgets_1.6.4     fs_2.1.0              shinycssloaders_1.1.0
[37] shinyjs_2.1.1         fontawesome_0.5.3     ragg_1.5.2            pkgconfig_2.0.3      
[41] teal.logger_0.4.1     pillar_1.11.1         bslib_0.11.0          later_1.4.8          
[45] gtable_0.3.6          glue_1.8.1            Rcpp_1.1.1-1.1        systemfonts_1.3.2    
[49] xfun_0.57             tibble_3.3.1          tidyselect_1.2.1      knitr_1.51           
[53] farver_2.1.2          xtable_1.8-8          bsicons_0.1.2         htmltools_0.5.9      
[57] shinyvalidate_0.1.3   shinyWidgets_0.9.1    compiler_4.5.2        S7_0.2.2

Relevant log output

No error or warning

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcore

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions