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

Allow creating disabled downloadButton()/downloadLink() #4119

Open
riccardoporreca opened this issue Aug 28, 2024 · 0 comments
Open

Allow creating disabled downloadButton()/downloadLink() #4119

riccardoporreca opened this issue Aug 28, 2024 · 0 comments

Comments

@riccardoporreca
Copy link

Including a downloadButton() (similar for downloadLink()) disabled explicitly in the app UI might be convenient for cases where the download is only available after some user interaction.

Before #4041, it was possible to add a "disabled" class when creating a downloadButton() in the UI (and then explicitly re-enable in the app server logic using e.g. shinyjs), but now the extra "disabled" class is always removed:

el.setAttribute("href", data);
el.classList.remove("disabled");
el.removeAttribute("aria-disabled");
el.removeAttribute("tabindex");

Maybe a nice way to resolve this would be to have built-in support for creating a disabled downloadButton() with disabled = TRUE , similar to actionButton(), with a similar mechanism to updateActionButton() for enabling/disabling it as part of the server logic?

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

1 participant