Skip to content

select_group_ui causing issues with bslib nav_panel fill properties #110

@PaulC91

Description

@PaulC91

Hi there,

I'm not sure if this is a bslib or datamods/shinyWidgets issue but I discovered some strange behaviour in bslib nav_panels and it only seems to be happening when I have a select_group_ui on the page.

Reprex:

library(shiny)
library(bslib)
library(datamods)
library(plotly)
library(leaflet)

fig <- plot_ly(midwest, x = ~percollege, color = ~state, type = "box")
lf <- leaflet() |> addTiles()

ui <- page_sidebar(
  sidebar = sidebar(
    select_group_ui(
      id = "my-filters",
      inline = FALSE,
      params = list(
        list(inputId = "Manufacturer", label = "Manufacturer:"),
        list(inputId = "Type", label = "Type:")
      )
    )
  ),
  navset_card_tab(
    title = "Navset Card",
    nav_panel("Chart", fig),
    nav_panel("Map", lf)
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

When I open this dashboard the htmlwidgets within the navset_card_tab initially fill their container as you would expect, but when I click onto the "Map" tab, both of the htmlwidgets seem to lose their fill behaviour and revert to a fixed height of 400px.

After lots of debugging, it seems this only happens when a select_group_ui is on the page. If I remove it, the htmlwidgets always fill their container when switching between the tabs.

Do you have any idea what might be causing this behaviour?

Thanks!
Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions