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

Should have way to start menuItems with subitems expanded #38

Closed
wch opened this issue Apr 21, 2015 · 9 comments
Closed

Should have way to start menuItems with subitems expanded #38

wch opened this issue Apr 21, 2015 · 9 comments
Assignees

Comments

@wch
Copy link
Contributor

wch commented Apr 21, 2015

No description provided.

@shrektan
Copy link

I want to add should have way to start box with box collapsed. Is this possible in the current code?

@wch
Copy link
Contributor Author

wch commented Apr 21, 2015

@shrektan See #33.

@wch
Copy link
Contributor Author

wch commented Apr 21, 2015

It looks like this might require replacing the $.AdminLTE.tree function from app.js so that the expanded treeviews don't have the active class, but something else. Also it'll require some CSS to display the treeviews without the active class.

@shrektan
Copy link

Good news! Thanks!

@pssguy
Copy link

pssguy commented Aug 6, 2015

It would also be useful to show and highlight the newly active menuItem or menuSubItem when using
updateTabItems

@wch wch added the targeted label Jan 26, 2017
@wch
Copy link
Contributor Author

wch commented Jan 26, 2017

The menuItem expanded/collapsed state should also be bookmarkable.

@bborgesr
Copy link
Contributor

@wch I guess this means that we should also allow bookmarking of the expanded/collapsed state of the whole sidebar, right? (this may affect #186)

@bborgesr
Copy link
Contributor

Note for future stumblers on this issue:

Once #199 is merged, the way to start with a "childfull" menuItem() expanded will to use the startExpanded argument. For example, in the app below, the last menuItem ("Charts") starts expanded and it's first child ("Sub-item 1") starts selected:

shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(
      sidebarMenu(
        # Setting id makes input$tabs give the tabName of currently-selected tab
        id = "tabs",
        menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
        menuItem("Widgets", icon = icon("th"), tabName = "widgets", badgeLabel = "new"),
        menuItem("Charts", icon = icon("bar-chart-o"), startExpanded = TRUE,
          menuSubItem("Sub-item 1", tabName = "subitem1", selected = TRUE),
          menuSubItem("Sub-item 2", tabName = "subitem2")
        )
      )
    ),
    dashboardBody(),
    title = "Dashboard example"
  ),
  server = function(input, output) { }
)

@bborgesr
Copy link
Contributor

Closed in #199

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

4 participants