In an admin list view use the table.columns
script to enable user to select columns to display and include either <tfoot>
or colgroup
elements in the table
table.columns should work as it does for tables that don't have tfoot or colgroup elements
the layout breaks with empty space at the right for the hidden columns and if <colgroup>
is in play the classes and styles screwed up
Joomla 5.1 (and presumably 4)
This is slightly tricky to fix - I made a start but got lost and ran out of time so simply abandoned using table.columns.js in my J5 components - which is a shame since the core components are using it.
A simple unsatisfactory workaround would be to amend the script to simply do nothing if either <tfoot>
or <colgroup>
are present in the table.
A <colspan>
anywhere in the table will also break it, but this perhaps could be more reasonably simply excluded as if you think about it it will be impossible to fix.
Labels |
Added:
No Code Attached Yet
|
On fix please update documentation at https://github.com/joomla/Manual/blob/92274eb46dc186737f2746dbaa072c8ab3ec659c/docs/building-extensions/components/table-columns.md?plain=1#L44
I set it as a bug, hovewer it is complex thing. And I think there a same issue with colspan.
In the end it probably will be won't fix.
Labels |
Added:
bug
|
I suggest that if colspan is present in the table then table-columns should exit with and optional error/log message on being loaded. A simple test at the top of the createControls()
.
tfoot and colgroup are not impossible from my quick look at the code - in fact looking again today I can't remember exactly why I gave up on it. It is still on my todo list, albeit with a flag of drekley
(which is a Cornish dialect word with a meaning like the Spanish manana but without the dreadful sense of urgency of manana)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-07-25 06:01:10 |
Closed_By | ⇒ | HLeithner |
I have submitted a PR for a (temporary) documentation change until this can be fixed.