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

When disabled() a Panel, downloadbutton not affected #223

Closed
crosspolar opened this issue Nov 18, 2020 · 1 comment
Closed

When disabled() a Panel, downloadbutton not affected #223

crosspolar opened this issue Nov 18, 2020 · 1 comment

Comments

@crosspolar
Copy link

When using shinyjs::disabled() with a Panel, it disables textinputs and actionbuttons like expected. However, downloadButtons get ignored and stay enabled. If you put the downloadButton solely into disabled though, it works like in originally posted by @daattali in #132 (comment).

MWE:

library(shiny)

ui <- fluidPage(
  shinyjs::useShinyjs(),
  shinyjs::disabled(
    wellPanel(
      id = "test_panel",
      downloadButton("testdw", "testdw"),
      actionButton("testab","testab"),
      textInput("testtext","testtext")
    )
    )
)

server <- function(input, output, session) {
  output$test <- downloadHandler(
    filename = "test.csv",
    content = function(con) {
      write.csv(mtcars, con)
    }
  )
}

shinyApp(ui, server)

grafik

@crosspolar crosspolar changed the title When disabled() a Panel, downloadbutton not affected When disabled() a Panel, downloadbutton not affected Nov 18, 2020
@daattali
Copy link
Owner

Thanks, should be fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants