Open gadenbuie opened 8 months ago
In addition, should include
4. I would like to use this as a sidebar sometimes. instead of having a sidebar with inputs, have this as a sidebar with navigation objects. Anything to make this more streamlined. Also, having the ability to add other objects below the nav items like a button could be useful
Thanks! We've been planning to implement sidebar navigation for a while and are tracking that work and relevant suggestions in #585.
I made a page_fillable()
dashboard that contains a navset_pill_list()
. Is it desired that the navset_pill_list()
sets the card_body()
height to 400px? For me this was unexpected in this context.
Is there maybe a workaround with the as_fill_carrier()
/ as_fillable_container()
functions? I did not manage to get it working.
My code:
library(bslib)
library(DT)
ui <- page_fillable(
navset_pill_list(nav_panel( # Sets card_body height to 400px, why?
title = "Page one",
card(
card_header("My table"),
card_body(DT::DTOutput("dt"))
)
))
)
server <- function(input, output) {
output$dt <- DT::renderDT({
DT::datatable(
mtcars, fillContainer = TRUE,
options = list(pageLength = nrow(mtcars)) # show all cars at once
)
})
}
shiny::shinyApp(
ui = ui, server = server, options = list(launch.browser = FALSE)
)
Screenshot:
As described in https://github.com/posit-dev/py-shiny/issues/1112, the layout and width of
navset_pill_list()
, at least when using the function defaults, could be improved.