We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This example includes a workaround to keep collapsed = FALSE, which is not respected when using conditionalPanel
collapsed = FALSE
library(shiny) library(bs4Dash) shinyApp( ui = dashboardPage( header = dashboardHeader( title = "My dashboard" ), sidebar = dashboardSidebar( sidebarMenu( id = "sidebarMenu", menuItem( text = "Tab 1", tabName = "tab1" ), menuItem( text = "Tab 2", tabName = "tab2" ), menuItem( text = "Tab 3", tabName = "tab3" ) ) ), body = dashboardBody( tags$script(HTML(" $(document).on('shiny:inputchanged', function(event) { if (event.name === 'sidebarMenu') { setTimeout(function() { if (!$('body').hasClass('control-sidebar-slide-open')) { $('#controlbar-toggle').click(); } }, 100); } }); ")) ), controlbar = dashboardControlbar( id = "controlbar", collapsed = FALSE, conditionalPanel( condition = "input.sidebarMenu=='tab1'", controlbarMenu( controlbarItem(title = "Item1"), controlbarItem(title = "Item4") ) ), conditionalPanel( condition = "input.sidebarMenu=='tab2'", controlbarMenu( controlbarItem(title = "Item2") ) ), conditionalPanel( condition = "input.sidebarMenu=='tab3'", controlbarMenu( controlbarItem(title = "Item3") ) ) ), title = "DashboardPage" ), server = function(input, output, session) { } )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This example includes a workaround to keep
collapsed = FALSE
, which is not respected when using conditionalPanelThe text was updated successfully, but these errors were encountered: