Is there any way of setting the datatable options to reduce the column padding? This link suggested using autoWidth=TRUE
along with scrollX=TRUE
, but it doesn't work in my code.
As you can see in the image below there is a big gap between columns forcing the user to scroll across, which I'd prefer to avoid if possible. This link and this one have the same problem in java
Here's the code for rendering the datatable.
output$book_table <- DT::renderDT(RVTables$book %>%
filter(deal==as.numeric(input$deal_choice)),
selection = list(mode="single",selected=row_edited),
editable = TRUE,
rownames = FALSE,
options=list(
autoWidth=TRUE,
scrollX = TRUE,
ordering=FALSE,
pageLength=12,
scrollY = TRUE,
bLengthChange= FALSE,
searching=FALSE
)
)
Thanks for any help.