Skip to content

NAV - Highlight correct group when moving through the dashboard or selecting a specific URL #131

Answered by jakubsob
mviertel asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mviertel,

I've stripped down the example to bare minimum and implemented changing of navbar selection when using navigation buttons (back, forward) and refresh button. Please let us know if this is something you had in mind:

library(shiny)
library(shiny.fluent)
library(shiny.router)
library(shinyjs)
library(glue)
library(dplyr)
library(purrr)

links <- data.frame(
  route = c("/", "Analysis"),
  name = c('Home', 'Analysis'),
  url = c('#!/', '#!/Analysis'),
  key = c('home', 'analysis'),
  icon = c("home", NA)
)

router <- make_router(
  route("/", h1("Home")),
  route("Analysis", h1("Analysis"))
)

navigation <- tagList(
  Nav(
    groups = list(
      list(
        links = purrr::tr…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@Tbwheeler94
Comment options

@Tbwheeler94
Comment options

@jakubsob
Comment options

@Tbwheeler94
Comment options

Answer selected by jakubsob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants