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

navbarMenu() issue using Gollem #389

Open
HugoGit39 opened this issue Jan 23, 2025 · 0 comments
Open

navbarMenu() issue using Gollem #389

HugoGit39 opened this issue Jan 23, 2025 · 0 comments

Comments

@HugoGit39
Copy link

HugoGit39 commented Jan 23, 2025

Hi

So I want to add menus in the header using navbarMenu()

I work with Gollem but somehow I get dots in the left corner plus a text calling "left"....which confuses me

The bs4Dash sample code does work

So with Gollem its a bit tricky to share all the code but this is app_ui.R

#' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#'     DO NOT REMOVE.
#' @import shiny
#' @import bs4Dash
#' @import dplyr
#' @import tidyr
#' @noRd

#' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#'     DO NOT REMOVE.
#' @import shiny
#' @noRd

# app UI
app_ui <- function(request) {
  tagList(
    dashboardPage(
      header = bs4DashNavbar(
        navbarMenu(
          navbarTab(tabName = "Tab1", text = "Tab 1"),
          navbarTab(tabName = "Tab2", text = "Tab 2"),
          navbarTab(
            text = "Menu",
            dropdownHeader("Dropdown header"),
            navbarTab(tabName = "Tab3", text = "Tab 3"),
            dropdownDivider(),
            navbarTab(
              text = "Sub menu",
              dropdownHeader("Another header"),
              navbarTab(tabName = "Tab4", text = "Tab 4"),
              dropdownHeader("Yet another header"),
              navbarTab(tabName = "Tab5", text = "Tab 5"),
              navbarTab(
                text = "Sub sub menu",
                navbarTab(tabName = "Tab6", text = "Tab 6"),
                navbarTab(tabName = "Tab7", text = "Tab 7")
              )
            )
          )
        )
      ),
      sidebar = dashboardSidebar(
      ),
      body = dashboardBody(
        # Add main content or placeholders for app UI here
      )
    )
  )
}


#' Add external Resources to the Application
#'
#' This function is internally used to add external
#' resources inside the Shiny application.
#'
#' @import shiny
#' @importFrom golem add_resource_path activate_js favicon bundle_resources
#' @noRd
golem_add_external_resources <- function() {
  add_resource_path(
    "www", app_sys("app/www"),
  )
}

Image

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