R 闪亮的标签框标题未对齐且不在右侧

问题描述 投票:0回答:0

如果我从这里运行示例代码不知何故标题与选项卡的标题不对齐,即在标题中垂直居中并且它没有一直向右对齐......怎么会这样?

在互联网上的示例中,标题的标题一直正确地对齐到右边......请参阅here 与 Sinydashboard 包 i.o. bs4dash...这可能是 bs4dash 的错误吗?

if (interactive()) {
  library(shiny)
  library(bs4Dash)

  menu_tab <- lapply(1:3, function(i) {
    tabPanel(
      sprintf("Menu %s", i),
      sprintf("Hello tab %s", i)
    )
  })

  shinyApp(
    ui = dashboardPage(
      header = dashboardHeader(),
      sidebar = dashboardSidebar(),
      controlbar = dashboardControlbar(),
      footer = dashboardFooter(),
      title = "tabBox",
      body = dashboardBody(
        tabBox(
          id = "tabcard",
          title = "A card with tabs",
          selected = "Tab 2",
          status = "primary",
          solidHeader = FALSE,
          type = "tabs",
          tabPanel(
            title = "Tab 1",
            "Content 1"
          ),
          tabPanel(
            title = "Tab 2",
            "Content 2"
          ),
          tabPanel(
            title = "Tab 3",
            "Content 3"
          )
        ),
        tabBox(
         id = "mybox2",
         title = "",
         .list = menu_tab
        ),
        selectInput(
        "tab",
        "Selected a tab",
        choices = paste("Menu", 1:3),
        "Menu 2"
       )
      )
    ),
    server = function(input, output, session) {
      observeEvent(input$tab, {
       updateTabsetPanel(session, inputId = "mybox2", input$tab)
      })
    }
  )
}
r shiny shinydashboard bs4dash
© www.soinside.com 2019 - 2024. All rights reserved.