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

strange interaction with shinyWidgets (dreamsR) #149

Open
xtimbeau opened this issue Sep 6, 2021 · 0 comments
Open

strange interaction with shinyWidgets (dreamsR) #149

xtimbeau opened this issue Sep 6, 2021 · 0 comments

Comments

@xtimbeau
Copy link

xtimbeau commented Sep 6, 2021

Here is a small reprex of a prettyToggle (really pretty btw) strange behavior when used with whinydashboardplus. As you can see toggling the prettytoggle is toggling the menu open/close icon on the right. It works correctly with shinydashboard, incorrectly with shinydashboardPlus.

library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
library(shinyWidgets)

ui  <- dashboardPage(
  title= "a title",
  header=dashboardHeader(title= "a title"),
  sidebar=dashboardSidebar(
    width="360px",
    sidebarMenu(
      id = "tabs",
      menuItem("Buttons", tabName = "dashboard", icon = icon("dashboard"),
               prettyToggle(inputId="pretty_tgl_1", label_on="on", label_off="off")))),
  body=dashboardBody(
    box(
      title = textOutput("box_state"),
      id = "mybox",
      background = "maroon", 
      gradient = TRUE,
      collapsible = TRUE,
      closable = TRUE,
      textOutput("pretty_tgl_1"),
      width=12)))

server <- function(input, output, session) {

  observeEvent(input$pretty_tgl_1, {
    output$pretty_tgl_1 <- renderText(input$pretty_tgl_1)
  })
}

shinyApp(
    ui = ui,
    server = server
  )

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

1 participant