rstudio/DT

updateSearch does not update numeric slider values

mikmart opened this issue · 0 comments

updateSearch() does not update the slider values according to the newly set search string for numeric columns.

library(shiny)
library(DT)

ui <- fluidPage(
  actionButton("set_search", "Set column search"),
  tags$hr(),
  DTOutput("iris")
)

server <- function(input, output, session) {
  output$iris <- renderDT(
    datatable(iris, filter = "top")
  )

  proxy <- dataTableProxy("iris")
  observeEvent(input$set_search, {
    updateSearch(proxy, keywords = list(columns = c("", "5.0 ... 6.0")))
  })
}

shinyApp(ui, server)

image

> xfun::session_info('DT')
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045), RStudio 2023.12.0.369

Locale:
  LC_COLLATE=English_United Kingdom.utf8  LC_CTYPE=English_United Kingdom.utf8   
  LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C                           
  LC_TIME=English_United Kingdom.utf8    

Package version:
  base64enc_0.1.3   bslib_0.6.1       cachem_1.0.8      cli_3.6.2         crosstalk_1.2.1  
  digest_0.6.34     DT_0.31.1         ellipsis_0.3.2    evaluate_0.23     fastmap_1.1.1    
  fontawesome_0.5.2 fs_1.6.3          glue_1.7.0        graphics_4.3.2    grDevices_4.3.2  
  highr_0.10        htmltools_0.5.7   htmlwidgets_1.6.4 httpuv_1.6.13     jquerylib_0.1.4  
  jsonlite_1.8.8    knitr_1.45        later_1.3.2       lazyeval_0.2.2    lifecycle_1.0.4  
  magrittr_2.0.3    memoise_2.0.1     methods_4.3.2     mime_0.12         promises_1.2.1   
  R6_2.5.1          rappdirs_0.3.3    Rcpp_1.0.12       rlang_1.1.3       rmarkdown_2.25   
  sass_0.4.8        stats_4.3.2       stringi_1.8.3     stringr_1.5.1     tinytex_0.49     
  tools_4.3.2       utils_4.3.2       vctrs_0.6.5       xfun_0.41         yaml_2.3.8  

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('DT'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/DT').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.