I am trying to make a shiny dashboard with datatables that span the entire height of the page (similar to this flexdashboard layout). With my current layout, I am facing an issue where the datatables are short and do not take up the full page.
How can I modify my layout to achieve datatable heights in a shiny dashboard similar to what happens in flexdashboard? (I have a working version in flexdashboard, but I want to use shiny dashboard because of the collapsible sidebar menu).
ui:
ui <- fluidPage(
dashboardPage(
dashboardHeader(title="HCD ADU Issue Look-Up Tool"),
dashboardSidebar(sidebarMenuOutput("Semi_collapsible_sidebar")),
dashboardBody(
column(width = 4,DT::dataTableOutput('issue_table')),
column(width =4, DT::dataTableOutput('interpretation_table')),
column(width = 4,DT::dataTableOutput('code_table'))
)
)
)
server:
server <- function(input, output, session) {
output$Semi_collapsible_sidebar=renderMenu({
sidebarMenu(
paste0("Example Text that will display dashboard information")
)
})
output$issue_table <- DT::renderDataTable(
DT::datatable(
issue_display_data,
options = list(
pageLength = nrow(issue_display_data),
dom = 'ft',
lengthChange = FALSE,
searchHighlight = TRUE
),
selection = 'single',
rownames = FALSE,
escape=FALSE
),fillContainer = TRUE
)
output$interpretation_table <- DT::renderDataTable(
DT::datatable(
interpretation_display_data,
options = list(
pageLength = nrow(interpretation_display_data),
dom = 'ft',
lengthChange = FALSE,
scrollX = TRUE,
searchHighlight = TRUE
),
selection = 'single',
rownames = FALSE,
escape=FALSE
), fillContainer = TRUE
)
output$code_table <- DT::renderDataTable(
DT::datatable(
code_display_data,
options = list(
dom = 'ft',
pageLength = nrow(code_display_data),
lengthChange = FALSE,
searchHighlight = TRUE
),
selection = 'single',
rownames = FALSE,
escape=FALSE
),fillContainer = TRUE
)
}