I want to disable multiple buttons that are placed together in a div(id = "buttons",...), where some of the buttons are ashiny::downloadButton().
I disable the buttons using shinyjs::disable(). ( In the real case they are disabled using a condition with toggleState but the problem stays the same using a simple disable).
Consider the following small example below:
library(shiny)
library(shinyjs)
ui <- fluidPage(
useShinyjs(),
div(id = "buttons",
actionButton("ActionButton", label = "ActionButton"),
downloadButton("DownloadButton", label = "DownloadButton")
)
)
server <- function(input,output){
observe({
shinyjs::disable("buttons")
})
}
shinyApp(ui,server)
The problem
The download button does not get disabled in the above example. It does get disabled when I explicitly add shinyjs::disable("DownloadButton"). But even then the CSS behaves differently, namely I get a "forbidden" symbol when hovering the actionButton but not the download button.
How do I get the download button to behave the same as the action Button?
Extra Info
Shiny version: 1.5.0
Shinyjs version: 2.0.0
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit) ( But the same happens also on a windows machine)
Running under: Ubuntu 20.04.1 LTS