diff --git a/NEWS.md b/NEWS.md index a71b6826..8f055dee 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ shinydashboard 0.5.3.9000 ========================= +* Fixed [#129](https://github.com/rstudio/shinydashboard/issues/129): Trigger shown/hidden event for Shiny outputs in the sidebar. ([#194](https://github.com/rstudio/shinydashboard/pull/194)) + * Fixed [#73](https://github.com/rstudio/shinydashboard/issues/73): add `collapsed` argument to `dashboardSidebar()`, which allows it to start off collapsed. ([#186](https://github.com/rstudio/shinydashboard/pull/186)) * Fixed [#62](https://github.com/rstudio/shinydashboard/issues/62): make images resize when the sidebar collapses/expands. [#185](https://github.com/rstudio/shinydashboard/pull/185) diff --git a/inst/shinydashboard.js b/inst/shinydashboard.js index b41c31bd..c9b6db1d 100644 --- a/inst/shinydashboard.js +++ b/inst/shinydashboard.js @@ -61,6 +61,10 @@ $(function() { $(window).trigger("resize"); }); + $(document).on("click", ".treeview > a", function() { + $(this).next(".treeview-menu").trigger("shown"); + }); + // menuOutputBinding // ------------------------------------------------------------------ // Based on Shiny.htmlOutputBinding, but instead of putting the result in a