0
Ist es möglich, das Dropdown-Menü Dashboard-Header oder ein Benachrichtigungselement basierend auf einem reaktiven Objekt zu rendern? Mein Versuch hat nicht funktioniert.reaktives Objekt im Dropdown-Menü in Shinydashboard
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(uiOutput("drop")),
dashboardSidebar(),
dashboardBody()
)
server <- function(input, output) {
values<-reactiveValues()
values[["numvotes"]]<-1
output$drop<-renderUI({
dropdownMenu(type = "notifications", badgeStatus = "warning",
notificationItem(icon = icon("ok", lib = "glyphicon"), status = "danger",
paste(values[["numvotes"]],"vote(s)")
) )
})
}
shinyApp(ui, server)