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 · Fixed by #3876 · May be fixed by thislooksfun/earthdawn#37

Comments

@runxc1
Copy link

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

This comment has been minimized.

Copy link
Member

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)?

@runxc1

This comment has been minimized.

Copy link
Author

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.

@tmorehouse

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

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

@runxc1

This comment has been minimized.

Copy link
Author

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.

@tmorehouse

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

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

@jackmu95 jackmu95 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

jackmu95 added a commit that referenced this issue Aug 14, 2019
feat(tables): add support for custom header attributes (closes #2244) (
…#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
Projects
3 participants
You can’t perform that action at this time.