I want to get a fixed Sidebar without any dropdown arrow. Could not find anything related to my issue, in RShiny, This is what I have.
Yet I want tools without any arrow. Here is the initial code:
app_ui <-
shiny::fluidPage(
theme = shinythemes::shinytheme("united"),
tags$head(tags$style(".navbar {margin-bottom: 0px;}")),
tags$head(
tags$style(".container-fluid {padding-right: 0px; padding-left: 0px;}")
),
# Your application UI logic
navbarPage(
title = div(
img(src = "www/bftb_logo_v8_bare.png", height = "30px"),
"AZ Oncology Bioinformatics Toolbox"
),
windowTitle = "BFTB Landing Page",
# windowTitle = "BFTB Landing Page",
# title = div(img(src = "www/bftb_logo_v8_bare.png", height = "30px"), "AZ Oncology Bioinformatics Toolbox"),
# theme = shinythemes::shinytheme("cerulean"),
tabPanel("Toolbox", icon = icon("wrench"),disable = TRUE,
shinydashboard::dashboardPage(
header = shinydashboard::dashboardHeader(title = " ", titleWidth = 300, disable = TRUE),
shinydashboard::dashboardSidebar(
width = 300 ,
shinydashboard::sidebarMenu(
shinydashboard::menuItem(
"Tools",
tabName = "tools_app",
icon = icon("wrench"),
shinydashboard::menuSubItem(
"Gene Expression/Signature/Pathways",
tabName = "gene_app",
icon = icon("chart-line")
),
etc, etc,
I have tried to add a new line of code in sideBarMenu
id = 'sidebar',
style = "position: relative; overflow: visible;",
And inserted in the wider code:
app_ui <- shiny::fluidPage(),
navbarPage(
title = div(
img(src = "www/my.png", height = "30px"),
"Toolbox"
),
windowTitle = "BFTB Landing Page",
# windowTitle = "BFTB Landing Page",
# title = div(img(src = "www/bftb_logo_v8_bare.png", height = "30px"), "AZ Oncology Bioinformatics Toolbox"),
# theme = shinythemes::shinytheme("cerulean"),
tabPanel("Toolbox", icon = icon("wrench"),disable = TRUE,
shinydashboard::dashboardPage(
header = shinydashboard::dashboardHeader(title = " ", titleWidth = 300, disable = TRUE),
shinydashboard::dashboardSidebar(
width = 300 ,
shinydashboard::sidebarMenu(
id = 'sidebar',
style = "position: relative; overflow: visible;",
shinydashboard::menuItem(
"Tools",
tabName = "tools_app",
icon = icon("wrench"),
shinydashboard::menuSubItem(
"Gene Expression/Signature/Pathways",
tabName = "gene_app",
icon = icon("chart-line")
),
etc. etc,
And yet get the same arrow down, without fixing it.
Now I thought it may be due to the menuSubItem
functionality, therefore forces them to behave as subItems and not removing the bar. Thus I have written the code with menuItem
and placed all the elements as 'menuItem'
But then I got an error "body is missing" when run again the app. Clearly I have the body inside the code. See pic for reference:
I have my body part of the code , this is an example.
shinydashboard::dashboardBody(
shinydashboard::tabItems(
shinydashboard::tabItem("tools_app", mod_tools_path_ui("tools_path_ui_1")),
shinydashboard::tabItem("gene_app", mod_gene_expressions_sign_path_ui("gene_expression_sign_path_ui")),
Thus I need to understand why I cannot get the Tools as fixed, as a heading to the subItems I have in the picture above. How to solve this ?