Closed (fixed)
Project:
DataTables
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 May 2022 at 12:25 UTC
Updated:
1 Feb 2023 at 14:14 UTC
Jump to comment: Most recent
The "Hide empty column" option (from the regular table style) isn't working with Views DataTables formatter.
Create a view with core's Table style and select "Hide empty column" option for columns which can be empty.
Create entities displayed in the views with empty columns and see that these columns are not appearing
Switch to Views DataTables style and see the previously hidden columns.
Fix hiding of empty columns.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybodyThe empty columns are already visible wihtout DataTables applied to the view. You can see that with disabled JavaScript.
Comment #3
anybodyOk I found it! It's the template_preprocess function in datatables.module, which re-adds the removed empty headers. I'll create a MR.
Comment #5
anybodyComment #6
thomas.frobieterWorks for me!
Comment #7
anybodyNow I saw that grouping is also broken... The group is inserted as first column. Reopening to fix this combined, as might be related.
Edit: No, it's unrelated! ;) Happens with and without the patch.
Edit2: Back to RTBC. This is so unrelated that we should not X-post it here... And quite special to our table with grouping, hidden fields, etc... Let's separate this.
Comment #8
anybodyComment #9
anybodyComment #10
anybodyUpdate... I found it. Both had the same root cause, I'll fix it in the MR. Needs review again afterwards.
Comment #11
anybodyUpdate... I found it. Both had the same root cause, I'll fix it in the MR. Needs review again afterwards.
Comment #12
thomas.frobieterWorks for me too.
Comment #15
dqdAwesome work and finding! Again @Anybody! ;-) +1
Comment #16
dqd