Formatting a datatable on a shiny dashboard which has multiple columns



Hi there,
I am new to R Shiny apps :slight_smile:

I have a datatable that has ~20 columns and i am displaying that on a shiny dashboard. I have set pageLength = -1 since i want all rows on 1 page always.

I was not able to see the horizontal scroll bar. So i turned on scrollX = true. But this has introduced more problems. When i try to filter columns towards the right (last few columns), the screen turns black and i have to click somewhere else to get out of it. The column headers seem to be fixed and do not readjust as i move the scroll bar.

As you can see on the image, the filter dropdown appears far on the right but the actual column is not that far. Below is snippet of the code i am using.

extensions = c('FixedHeader', 'Buttons', 'ColReorder','KeyTable' ), options = list( autowidth = TRUE,
dom = 't',
buttons = list('copy', 'csv', 'excel'),
scrollX = TRUE,
scrollY = 300,
scrollCollapse = TRUE,
paging = FALSE,
#pageLength = -1,
fixedHeader = TRUE,
colReorder= TRUE,
keys = TRUE)

Can someone guide me? I just need a simple scroll bar on the bottom (just like the vertical one) and i don't need/want to shrink the table size. Also, i would like the FixedHeaders to work properly while filtering.