Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't call shiny::restoreInput() inside accordion() if id isn't provided #646

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# bslib 0.5.0.9000

* Closed (#636): Outputs in sidebars now work as expected when an initially-closed sidebar is opened. (#624)
## Bug fixes

* Closed #636: Outputs in sidebars now work as expected when an initially-closed sidebar is opened. (#624)
* Closed #640: `accordion()` no longer errors when an `id` isn't supplied inside a Shiny `session` context. (#646)

# bslib 0.5.0

Expand Down
2 changes: 1 addition & 1 deletion R/accordion.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ accordion <- function(..., id = NULL, open = NULL, multiple = TRUE, class = NULL
attrs <- args[nzchar(argnames)]
children <- args[!nzchar(argnames)]

if (isNamespaceLoaded("shiny")) {
if (!is.null(id) && isNamespaceLoaded("shiny")) {
open <- shiny::restoreInput(id = id, default = open)
}

Expand Down