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

detail-row-component, data structure from @vuetable:cell-clicked event is changed? #720

Open
tennom opened this issue May 13, 2021 · 0 comments

Comments

@tennom
Copy link

tennom commented May 13, 2021

I migrated from the stable version 1.7 to @next.
I found there may be a change in the structure of data passed to cell-clicked method. I have the event handler like this as usual.

onCellClicked(data, field, event) {
     console.log("--------" + JSON.stringify(data));
     this.$refs[this.vuetableRef].toggleDetailRow(data.id);
},

with v1.7, the console prints

vuetable1 7data

with @next or v2.0, I see the data object nested in this data object and other objects, i.e; fields and data.id is of course undefined.

vuetable1

So for detail-row-component to work for @next version in my case, I had to make the trivial change from data.id to data.data.id like this:
this.$refs[this.vuetableRef].toggleDetailRow(data.data.id);
, and it works.

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

No branches or pull requests

1 participant