'Is there a way to freeze the horizontal scroller in DT?
I have a data frame with a lot of rows and columns, so I added a horizontal scroll bar so the columns wouldn't be squished. However In order to access the scroll bar I need to scroll all the way to the bottom of the datatable.
Is there an option to lock the horizontal scroll bar to the bottom of your screen and not the bottom of the datatable in the base DT package or do I need a DT extension?
output$sheet <- renderDT({
datatable(
display_table(),
options = list(
scrollX = TRUE,
autoWidth = TRUE,
pageLength = nrow(display_table()),
columnDefs = list(
list(width = "65px", targets = c(1,11)),
list(className = 'dt-center', targets = "_all")
)
)
)
})
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
