bs4Dash
bs4Dash copied to clipboard
Bookmarking for specific MenuItem
I am struggeling to implement bookmarks to specific items selected via selectInput
which are part of a specific menuItem. The structure of the sidebar is as follows:
bs4DashSidebar(
bs4SidebarMenu(
id = "sidebarid",
bs4SidebarMenuItem("Intro", tabName = "intro"),
bs4SidebarMenuItem("Kaarten", tabName = "kaartekomplexer",
startExpanded = TRUE,
expandedName = "kaartekomplexer",
selected = FALSE
),
conditionalPanel(
'input.sidebarid == "kaartekomplexer"',
selectInput(
inputId = "variable",
label = "Kaartekomplexer",
selectize = FALSE,
size= 20,
choices = make_choices()
),
tags$p("Wielt eng Kaart oder tippt, fir ze sichen."),
bookmarkButton()
),
bs4SidebarMenuItem("Kaartekatalog", tabName = "kaartekatalog"),
bs4SidebarMenuItem("Remerciementen", tabName = "outro")
),
skin = "light",
collapsed = FALSE,
minified = FALSE,
width = 300,
),
dashboardBody(
#use_theme(mytheme),
bs4TabItems(
# page Intro ----
bs4TabItem(tabName = "intro", includeMarkdown("intro.md")),
)
While it is possible to generate the bookmark for input selections in the menuItem 'kaartekomplexer', the URL is leading to the starting page of the shiny app and not to the desired menu item. When then selecting manually the menu item 'kaartekomplexer', the correct choice of the input is maintained and displayed. The main problem thus seems to be to make the bookmark jump to the correct menu item. I've experimented with 'selected = TRUE', but this evidently will open this specific page always. Some advice how to solve this problem is appreciated. Thanks!
Hello,
I’m facing the same issue; is there some kind of workaround to set the selected tab in the bookmark?