DT icon indicating copy to clipboard operation
DT copied to clipboard

FixedColumn does not align when caption is too long

Open dchiu911 opened this issue 5 years ago • 0 comments

It seems that if the caption is too long, the extra line wrappings causes it to mess up the alignment of the fixed column with the other columns:

library(DT)
m = as.data.frame(round(matrix(rnorm(100), 5), 5))
datatable(
  m,
  caption = "Short",
  extensions = 'FixedColumns',
  options = list(
    dom = 't',
    scrollX = TRUE,
    fixedColumns = TRUE
  )
)
datatable(
  m,
  caption = "Very long caption messes up alignment",
  extensions = 'FixedColumns',
  options = list(
    dom = 't',
    scrollX = TRUE,
    fixedColumns = TRUE
  )
)

image image

dchiu911 avatar Dec 02 '20 20:12 dchiu911