Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
shiny conditionalPanel() JS condition not working with bslib

Using shiny 1.6.0 and bslib 0.3.0.

This work as expected:

library(shiny)

ui <- navbarPage(
    title = "Minimal Example Issue",
    id = "tabs",
    header = conditionalPanel(
            condition = "input.tabs == 'tab_1'",
            HTML("Special tab 1")
        ),
    tabPanel("tab_1", "Hello"),
    tabPanel("tab_2", "Hi")
)

server <- function(input, output) {}

shinyApp(ui = ui, server = server)

This doesn't as the condition isn't met on selection of tab_1:

library(shiny)
library(bslib)

ui <- page_navbar(
    title = "Minimal Example Issue",
    id = "tabs",
    header = conditionalPanel(
            condition = "input.tabs == 'tab_1'",
            HTML("Special tab 1")
        ),
    nav("tab_1", "Hello"),
    nav("tab_2", "Hi")
)

server <- function(input, output) {}

shinyApp(ui = ui, server = server)

I would like to understand which JS element has replaced the input.tabs in the second example.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

upgrading shiny to 1.7.0 (now on CRAN) fix it

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!