Sidebar open parameter crash Shinylive when passing a list
cedricbouffard opened this issue · 3 comments
cedricbouffard commented
When passing a list to the open parameter in a sidebar, shinylive will display this error:
I tried with a named character vector, same problem.
Here's a sample code:
library(shiny)
library(bslib)
ui <- page_sidebar(
sidebar = sidebar(
open = list(desktop = "always", mobile = "open")
),
mainPanel(
"Test"
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
gadenbuie commented
I wonder if there's an encoding issue? I just copied your example into shinylive and it worked as expected. (I edited it lightly in that link but the direct copy works as well.)
I noticed that the error message appears to say
Error: `open` must be one of "desktop", "open", "closed", or "always", not "always".
which seems to indicate there's a difference between "always"
and "always"
?
gadenbuie commented
Oh, actually I think I found the bug! I'm not sure which exact conditions produce the error, but I ran into it myself and know how to fix it :)