I have the code below which is taken from this question. It was working on my computer recently and now for no apparent reason I keep getting Error in dots_list(...) : attempt to apply non-function
. If I remove the code editing the HTML style from lines 17 though 47 the code runs. Any ideas as to why it may not be running. A sessionInfo()
call is also below. I should note re-installing R is not preferable because I have admin restrictions that would require me to get IT involved.
library(shiny)
library(shinythemes)
library(DT)
d=as.data.frame(cbind(1:100,201:300))
ui<-fluidPage(
theme = shinytheme("slate"),
mainPanel(
### add your style inline css values here
### added a line of code here too `.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover `###
tags$style(HTML("
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
color: #ffffff;
}
### ADD THIS HERE ###
.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#ffffff !important;border:1px solid transparent;border-radius:2px}
###To change text and background color of the `Select` box ###
.dataTables_length select {
color: #0E334A;
background-color: #0E334A
}
###To change text and background color of the `Search` box ###
.dataTables_filter input {
color: #0E334A;
background-color: #0E334A
}
thead {
color: #ffffff;
}
tbody {
color: #000000;
}
"
))
),
DT::dataTableOutput('shipment.table')
#list(tags$head(tags$style("shipment.table span {color: #333333 ; background: #999999;}")))
#tags$head(tags$style("#shipment.table table {color: red;}"))
)
server<-function(input, output,session) {
output$shipment.table <- renderDataTable(d,filter = 'bottom',
options = list(lengthMenu = list(c(10,20,50,100,-1), c('10','20','50','100','All')),
pageLength = 10,autoWidth = TRUE),rownames=F) #%>% formatStyle(1,color="black")
}
shinyApp(ui=ui,server=server)
Session Info:
> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)
Matrix products: default
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: America/Los_Angeles
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sp_2.1-3 DT_0.33 shinythemes_1.2.0 leaflet_2.2.2
[5] scales_1.3.0 ggplot2_3.5.1 tidyr_1.3.1 dplyr_1.1.4
[9] data.table_1.15.4 sf_1.0-16 shiny_1.8.1.1 arcgisbinding_1.0.1.306
loaded via a namespace (and not attached):
[1] sass_0.4.9 utf8_1.2.4 generics_0.1.3 class_7.3-22 KernSmooth_2.23-22
[6] lattice_0.22-6 digest_0.6.33 magrittr_2.0.3 grid_4.3.2 fastmap_1.1.1
[11] jsonlite_1.8.8 e1071_1.7-14 DBI_1.2.2 promises_1.3.0 purrr_1.0.2
[16] fansi_1.0.6 crosstalk_1.2.1 jquerylib_0.1.4 cli_3.6.2 rlang_1.1.2
[21] units_0.8-5 munsell_0.5.1 cachem_1.0.8 withr_3.0.0 tools_4.3.2
[26] colorspace_2.1-0 httpuv_1.6.15 vctrs_0.6.5 R6_2.5.1 mime_0.12
[31] proxy_0.4-27 lifecycle_1.0.4 classInt_0.4-10 htmlwidgets_1.6.4 pkgconfig_2.0.3
[36] pillar_1.9.0 bslib_0.7.0 later_1.3.2 gtable_0.3.5 glue_1.7.0
[41] Rcpp_1.0.12 tibble_3.2.1 tidyselect_1.2.1 rstudioapi_0.16.0 xtable_1.8-4
[46] htmltools_0.5.8.1 compiler_4.3.2