Allow colspan=(all) items
See original GitHub issueI know this one might be a bit controversial/difficult, but wanted to throw it out there and see what y’all thought.
I have the need to “group” things in a single table (single table so I get selectable support) and the most natural way of displaying the groupings I can think of would be to use a row where colspan
is all the columns.
An quick-and-dirty example might be (of course, with much more beautiful styling)
Weapon | Person |
---|---|
Study | |
Rope | Professor Plum |
Gun | Colonel Mustard |
Kitchen | |
Knife | Mrs. White |
Where the items coming in look like:
[
{room: "Study", weapon: "Rope", person: "Professor Plum"},
{room: "Study", weapon: "Gun", person: "Colonel Mustard"},
{room: "Kitchen", weapon: "Knife", person: "Mrs. White"},
]
(although I’m more than happy to transform my items if the implementation is easier with a different representation)
My particular use case would include:
- the ability to use
tbody-tr-class
(or similar) to style said rows - not have those rows selected in range mode (“skips” over them)
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Colspan all columns - html - Stack Overflow
The best thing to do is set the colspan to the correct number to begin with. If your table has 5 columns, set...
Read more >Colspan All Columns In HTML - Weston Ganger
So I needed to make a column span all remaining columns in the row but I didn't know what number to set it...
Read more >Table Rowspan And Colspan In HTML Explained (With ...
Allows a single table cell to span the height of more than one cell or row. Why use colspan= or rowspan= ? Sometimes...
Read more >column-span - CSS: Cascading Style Sheets - MDN Web Docs
The column-span CSS property makes it possible for an element to span across all columns when its value is set to all.
Read more >HTML | colspan Attribute - GeeksforGeeks
The colspan attribute in HTML specifies the number of columns a cell should span. It allows the single table cell to span the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not needed…
You could do the following:
and then loop through your items like so:
And then pass this modified items to
b-table
, and then use the following slots:Should get you close to what you want.
Fair enough, thanks again!