DT
DT copied to clipboard
FixedColumn does not align when caption is too long
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
)
)
