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

Fix for "Table component passing $attrs (such as ID) to pagination, instead of table div" (issue #2946) #3362

Closed
wants to merge 6 commits into from

Conversation

Numenorian
Copy link
Contributor

@Numenorian Numenorian commented Jun 8, 2021

Fixes #2946

Proposed Changes

  • in src/components/table/Table.vue, I removed the v-bind="$attrs" statement from both <b-table-pagination> components and added it to the main <div class="b-table">
  • I'm not sure why the v-bind="$attrs" statements were on the pagination components in the first place, so I'm not sure if this breaks any other new features or intended functionality. If so, let me know and I can take another look at it.
  • also a minor typo fix in README.md

@jtommy
Copy link
Member

jtommy commented Jun 8, 2021

I don't know if there are missing prop about pagination but it would be a breaking change

@Numenorian
Copy link
Contributor Author

I'm sorry, I'm not sure I follow. Have there been new things added in Buefy 0.9.0+ that depend on HTML attributes from <b-table> being passed on to the <b-table-pagination> component(s)?

@jtommy
Copy link
Member

jtommy commented Jun 10, 2021

At the moment v-bind is on pagination component so moving it to table it might create problems or breaking changes

Re-added `v-bind="$attrs"` on `<b-table-pagination>` components. This lets certain attributes pass to the pagination components as well as the main table div.
@Numenorian
Copy link
Contributor Author

Numenorian commented Jun 10, 2021

Ok, I see what you mean now, especially with how the docs pagination example uses the aria-... labels for accessibility attached to the main <b-table> element.

I've re-added the v-bind="$attrs" statements and done some experimentation. It appears that with all 3 statements in place, the class and style attributes are only applied to the main table div, while other attributes such as id are transferred to all 3 divs. Interestingly, though, as far as I can tell the aria-... accessibility labels still seem to only be applied to the pagination divs.

Edit: would you like me to add a short blurb to the docs text describing these quirks?

@wesdevpro
Copy link
Member

This PR has been migrated to a discussion for later reference #3974

@wesdevpro wesdevpro closed this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table component passing $attrs (such as ID) to pagination, instead of table div
3 participants