How to adjust the output table generated in a shiny code
In the datatable
options, it's scrollX
and not scrollx
, change that and you get your desired output.
output$table <- renderDataTable({
datatable (
data_subset(),
options = list(
columnDefs = list(list(className = 'dt-center', targets = "_all")),
paging = TRUE,
searching = FALSE,
pageLength = 10,
dom = 'tip',
scrollX = TRUE
),
rownames = FALSE
)
})