scrollX option not working as expected?
scrollX option not working as expected?
It seems to me that scrollX option is not working as one would expect it to work. Here are some examples with different values of scrollX option.
scrollX option explicitly set to false, table style set to "display compact"
DataTable component is trying to fit the data into the table. If the data does not fit into the table the table is widened and overflows the original position and looks "broken". This seems to work according to common sense.
scrollX option explicitly set to true, table style set to "display compact"
DataTable never tries to fit the data into the table - even if it could fit it by making individual columns narrower and spanning text accross multiple rows. This is wrong, I think, since scrollX option description in the documentation promises that the component enables scrollbar only when it is needed; it would be logical to assume that the component first tries to fit the data into the table by aforementioned methods before resorting to scrolling; however it does not.
scrollX option not set explicitly (according to DataTables documentation option should be "false" and therefore act the same as in first described case however practice proves different)
when the data does not fit into the table scrollbar is displayed - however column titles are not scrolled along the data; this is weird and I think can be considered as a defect.