A component inside table headers slot
See original GitHub issueSteps to reproduce
Hi, I wanted to put a component inside datatables headers slot like this:
<template slot="headers" scope="props">
<my-component />
</template>
my-component
contains all th
tags wrapped in a tr
tag which is the root.
<tr>
<th>blah</th>
</tr>
but by doing so vuetify wraps my component in another tr
which messes up the markup, the result is a tr
containing a tr
<tr>
<tr>
<th>blah</th>
</tr>
</tr>
this is due to this line of code: head.js:13
children = row.length && row[0].tag === 'tr' ? row : this.genTR(row)
when using a component, the tag property is assigned the component’s name thus, a new tr is generated.
is there a workaround?
Thank you.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Tables with Two Headers | Web Accessibility Initiative (WAI)
This page covers tables that have a simple row header and a simple column header. In such tables, the relationship between the headers...
Read more >How can you customize all elements in a table header?
It is possible to loop the headers to make all capitalize. here is the working codepen: https://codepen.io/chansv/pen/gOaRWQb?editors=1010
Read more >Table | Components - BootstrapVue
These titles will be displayed in the table header, in the order they appear ... of the table-colgroup slot will be placed inside...
Read more ><th>: The Table Header element - HTML - MDN Web Docs
The <th> HTML element defines a cell as header of a group of table cells. The exact nature of this group is defined...
Read more >Data table component - Vuetify
The show-select prop will render a checkbox in the default header to toggle all rows, and a checkbox for each default row. You...
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
That’ll have to end up being user error I think. You can only have one root element in vue templates anyway, so a user would have to do something like
which isn’t valid html in a table anyway.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord