RinteRface / shinydashboardPlus

extensions for shinydashboard
https://shinydashboardplus.rinterface.com
Other
454 stars 77 forks source link

about AppButton #9

Closed happyshows closed 3 years ago

happyshows commented 6 years ago

Can you convert it into input buttons (interactivity) in the next release? rationale - If it's in the button form, user would naturally expect to be able to 'click' it and get some response.

DivadNojnarg commented 6 years ago

Thanks for your suggestions! As soon as I have free time yes

DivadNojnarg commented 3 years ago

Fixed in latest version:

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

 shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody(
     box(
      title = "App Buttons",
      status = NULL,
      appButton(
        inputId = "myAppButton",
        label = "Users", 
        icon = icon("users"), 
        dashboardBadge(textOutput("btnVal"), color = "blue")
      )
     )
    ),
    title = "App buttons"
  ),
  server = function(input, output) {
   output$btnVal <- renderText(input$myAppButton)
  }
 )