-
Notifications
You must be signed in to change notification settings - Fork 298
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
dropdownMenuOutput and sidebarMenu #229
Comments
I have a similar problem. My dropdownMenu: contains reactive values, and tabs will jump back to the first tab when values are changed.
|
I apologize for not being very responsive lately. This is a bit surprising (especially because |
Psych! Sorry, forget my last comment... I actually ended up spending some time on this now because it was so surprising at first. Luckily, the fix was surprisingly simple (see PR for details). You should all be able to run you original workaround-less code now if you install |
Thank you very much, it seems to work like a charm! |
Thank you, I updated the recent version. Just for info, the version number is not updated in the DESCRIPTION file (don't know whether that matters at all). Thanks anyways! |
It doesn't really matter, but it should always be up to date to differentiate between the current development version ( |
Hi, library(shiny)
library(shinydashboard)
library(shinyjs)
jscode <- 'shinyjs.writeABC = function(){
Shiny.unbindAll();
$("#foo").val("abc");
Shiny.bindAll();
}
'
ui <- dashboardPage(
dashboardHeader(
title = NULL
),
dashboardSidebar(
sidebarMenuOutput("menuUI"),
textInput("foo", "Type something", "")
),
dashboardBody(
useShinyjs(),
extendShinyjs(text = jscode),
tabItems(
tabItem(tabName = "tab1",
h1("tab1")
),
tabItem(tabName = "tab2",
h1("tab2"),
actionButton("click", "Write ABC")
)
)
)
)
server <- shinyServer(function(input, output, session) {
output$menuUI <- renderMenu({
sidebarMenu(
menuItem("Tab1", tabName = "tab1"),
menuItem("Tab2", tabName = "tab2")
)
})
observeEvent(input$click, {
js$writeABC()
})
})
shinyApp(ui, server) |
How can I install shinydashboard package from master? |
Hi,
There is an issue resolved in the
barbara/renderMenu
branch, but still occurring in the master branch: when the selected tab is not the first, and the renderMenu is invalidated, the first tab gets selected. Here is an example:If you type something inside the textInput, tab1 is selected.
The text was updated successfully, but these errors were encountered: