Only the first side nav tab displays Data Table
Closed this issue · 3 comments
benewberg commented
When the material page has side nav tabs, only the first tab displays the table output, and the second tab is blank. This also happens with a plotOutput. Do I have the tabs setup properly to display this?
library(shinymaterial)
ui <- material_page(
title = "Title",
material_side_nav(
fixed = TRUE,
material_side_nav_tabs(
side_nav_tabs = c(
"Good" = "tab_good",
"Bad" = "tab_bad"
)
)
),
material_side_nav_tab_content(
side_nav_tab_id = "tab_good",
tableOutput("good_table")
),
material_side_nav_tab_content(
side_nav_tab_id = "tab_bad",
tableOutput("bad_table")
)
)
server <- function(input, output, session){
output$good_table <- renderTable({
mtcars
})
output$bad_table <- renderTable({
mtcars
})
}
shinyApp(ui, server)
ericrayanderson commented
Thank you for catching this. Looking into a fix.
ericrayanderson commented
Can you try the latest dev version?
devtools::install_github("ericrayanderson/shinymaterial")
Just made an update, hopefully it will solve your issue.
benewberg commented
Perfect! Working now, thank you for the quick response, and for this package!