Navigate to another "tab" within learnr markdown based on selectizeinput

I have a Shiny-based element in my learnr tutorial like so:

selectizeInput("ex_topic", "Topic", choices = list(
  Select = c("Choose one" = ""),
  Indexing = c(`Exercise 1` = "ex1", `Exercise 2` = "ex2"),
  Subsetting = c(`Exercise 3` = "ex3", `Exercise 4` = "ex4")

When users click on an option, I want the learnr tutorial to automatically navigate to the page with that exercise (exercises are listed with the following headings in the r markdown)

## Exercise 1

## Exercise 2

In Shiny, a similar navigational idea is accomplished using:

observeEvent(input$ex_topic, {
  if(input$ex_topic == "ex1") {
    updateTabsetPanel(session, "navmaster", selected = "ex1")

where "navmaster" is the id for the entire shiny::navbarPage and pages are made in shiny::tabPanel

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.