Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<b-table> fields has a tdAttr but no thAttr #2244

Closed
runxc1 opened this issue Dec 3, 2018 · 5 comments
Closed

<b-table> fields has a tdAttr but no thAttr #2244

runxc1 opened this issue Dec 3, 2018 · 5 comments

Comments

@runxc1
Copy link

@runxc1 runxc1 commented Dec 3, 2018

The b-table component has a a way to add custom properties to each table cell (td) but there is no way to add custom properties to the table header (th). Seems like an oversight as most other properties on the Fields list have a th and td variant.

@tmorehouse
Copy link
Member

@tmorehouse tmorehouse commented Dec 6, 2018

Re you referring to the th elements in the table head, or in the body section of the table (i.e. row headers)?

Loading

@runxc1
Copy link
Author

@runxc1 runxc1 commented Feb 13, 2019

So I am talking about the table head. Which I believe is where the only th elements are rendered inside the component.

In the table Field reference there are the following fields tdClass, thClass, thStyle, tdAttr (https://bootstrap-vue.js.org/docs/components/table)

What is missing is a thAttr Field that would easily allow you to add an arbitrary attribute. Seems that most of the plumbing is already done.

Loading

@tmorehouse
Copy link
Member

@tmorehouse tmorehouse commented Mar 20, 2019

tbody also supports cells being rendered as th (a row header) instead of td

Loading

@runxc1
Copy link
Author

@runxc1 runxc1 commented Mar 20, 2019

I didn't think the component supported that but yeah its the column headers in the thead that I was referring to.

Loading

@tmorehouse
Copy link
Member

@tmorehouse tmorehouse commented Mar 20, 2019

Well see about getting it added in a near future release.

Loading

@jacobmllr95 jacobmllr95 changed the title b-table fields has a tdAttr but no thAttr <b-table> fields has a tdAttr but no thAttr Apr 9, 2019
@tmorehouse tmorehouse added this to To Do in 2.0.0 Stable May 7, 2019
@tmorehouse tmorehouse moved this from To Do to On Hold in 2.0.0 Stable May 24, 2019
2.0.0 Stable automation moved this from On Hold to Completed Aug 14, 2019
jacobmllr95 added a commit that referenced this issue Aug 14, 2019
…#3876)

* feat(tables): add support for custom header attributes

* Update README.md

* Update mixin-tbody-row.js

* Update mixin-thead.js

* Update table.spec.js

* Update table-lite.spec.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment