ColumnControl Icon Placement and Menu Displacement
ColumnControl Icon Placement and Menu Displacement

Link to test case: https://live.datatables.net/lonapuci/1/
Description of problem:
Column Control Placement.
-- The column control control icons appears to the right of the header text except when the column contains numerical data.
-- There doesn't appear to be a way to control the placement.
-- Shouldn't the column control be on the same side (e.g., right side) for all columns?
Displacement of Column Control Menu with Scroll X.
-- With wide tables and scroll X enabled, the column control menu will be horizontally displaced from the hamburger icon
-- This effect can be very significant for tables with many columns (>20)
Thank you so much for adding this feature--it is my most awaited feature for DataTables and the variety of options are amazing!
This question has an accepted answers - jump to answer
Answers
Hi,
This comes about from a change in DataTables 2.3 whereby the text for the header is now correctly in alignment with the text of the data. The 2.3 blog post talks about this a bit.
If you don't want the automatic alignment for the numeric and date classes, you can override their classes:
Thank you
. Any other ideas for what you'd like to see added in future (be it ColumnControl content, or anything else for DataTables) would be very welcome.
Allan
Thanks for the pointer to the 2.3 blog post on the alignment handling--makes sense now!
Were you able to confirm the second issue--the displacement of the ColumnContol dropdown menu which occurs when scrollX is enabled?
Doh - I missed that part. Sorry. I think I know what has gone wrong there. I should be able to post a fix tomorrow.
Allan
Thank you!
Fix committed and I've included an example of a scrolling table with a dropdown for completeness.
I'll aim to get a release with this patch done tomorrow.
Allan
Just made the same fix in my local version and it's working. Awesome!
Awesome - thanks for confirming.
Allan