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

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

Open
amandaporto opened this issue Oct 5, 2020 · 4 comments

Comments

@amandaporto
Copy link

amandaporto commented Oct 5, 2020

Overview of the problem

Buefy version:0.9.3
Vuejs version: 2.6.12
OS/Browser: MacOs Catalina/ All browsers

Description

When passing an attribute, such as id to b-table, it gets tacked onto pagination, instead of the table div created by the component. I believe the issue lies here:

   <b-table-pagination
        v-bind="$attrs".  <<<<<<<<<<<<<<<
        :per-page="perPage"
        :paginated="paginated"
        :icon-pack="iconPack"
        :total="newDataTotal"
        :current-page.sync="newCurrentPage"
        @page-change="(event) => $emit('page-change', event)"
   >

Steps to reproduce

1 - add an ID or other attribute to b-table
2 - inspect the table with dev tools and notice the ID added is not on div class='b-table anymore, but instead in div class='top-level'`

Expected behavior

Similarly to how it was before the 0.9.0 upgrade, the ID passed to the b-table should be on the div surrounding the table, not the pagination div.

Actual behavior

Id is on pagination div.

@Minhyme
Copy link
Contributor

Minhyme commented Nov 17, 2020

I'm just wondering if this will be reverted back to the previous behavior or is this permanent?

@jtommy jtommy added the bug label Nov 17, 2020
@jtommy
Copy link
Member

jtommy commented Nov 17, 2020

It's incorrect, it will be fixed

@ritdaw
Copy link

ritdaw commented Jan 7, 2021

Any thoughts on a temporary workaround?

@thebrownfox
Copy link
Contributor

Tried to give pass order to pagination via $attrs. Doesn't work as there's no binding inside table pagination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants