Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix tab input value updating for BS4 dropdowns - #3412

#3412
Merged
cpsievert merged 6 commits into
masterrstudio/shiny:masterfrom
bs4-nav-bugfixrstudio/shiny:bs4-nav-bugfixCopy head branch name to clipboard
Jun 2, 2021
Merged

Fix tab input value updating for BS4 dropdowns#3412
cpsievert merged 6 commits into
masterrstudio/shiny:masterfrom
bs4-nav-bugfixrstudio/shiny:bs4-nav-bugfixCopy head branch name to clipboard

Conversation

@cpsievert

Copy link
Copy Markdown
Collaborator

This fixes an oversight made in #3372, when we switched (back to) emit-ing li a.dropdown-item instead of a.dropdown-item. To verify the fix, notice how (before this change) selecting tab B results in an input value of NULL (when it should be "B"):

library(shiny)

ui <- fluidPage(
  theme = bslib::bs_theme(version = 4),
  tabsetPanel(
    id = "tabs",
    tabPanel("A", "a"),
    navbarMenu("menu", tabPanel("B", "b"))
  )
)

server <- function(input, output, session) {
  observe({
    print(input$tabs)
  })
}

shinyApp(ui, server)

@cpsievert
cpsievert requested a review from schloerke June 2, 2021 19:03
Comment thread srcts/src/main.ts
Comment thread srcts/src/main.ts
Comment thread srcts/src/main.ts Outdated
Comment thread srcts/src/main.ts Outdated
@cpsievert
cpsievert merged commit dcca77c into master Jun 2, 2021
@cpsievert
cpsievert deleted the bs4-nav-bugfix branch June 2, 2021 20:55
schloerke added a commit that referenced this pull request Jun 2, 2021
* master:
  Fix tab input value updating for BS4 dropdowns (#3412)
  Follow up to #3410: bump version and update news (#3411)
  Bootstrap 5 support (#3410)
  Use bslib's new nav() api to implement tabPanel() and friends (#3388)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.