datatable adjust column width

I want my datatable to have autowidth for all the columns but without using the scrollX = T
Currently, this is how my datatable options look like:

datatable(rownames = FALSE,
                    escape = F, 
                    options = list(autoWidth = T, 
                                   columnDefs =    list (list(className = 'dt-left', targets = "_all"),
                                                     list(width = '70px', targets = c(3,4))
                                   fixedHeader = TRUE,
                                   fixedColumns = list(
                                     rightColumns = 3,
                                     heightMatch = 'none'
                                   pageLength = 5

But since there is scrollX true it is having a scroll bar and that is something I am trying to eliminate and trying to have a constant table without any scrolls
If I simply remove the scroll then for some reason it does not allow the autowidth to work. The target columns here are date columns for me so without the scroll those columns look weird because they squeez back with yyyy- in the first line and mm-dd in the next

How to fix this?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.