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.
upgrading shiny to 1.7.0 (now on CRAN) fix it