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

[Feature Request] Data Table expand all expandable per default #2890

Closed
eggnaube opened this issue Dec 29, 2017 · 11 comments
Closed

[Feature Request] Data Table expand all expandable per default #2890

eggnaube opened this issue Dec 29, 2017 · 11 comments
Assignees
Labels
T: enhancement Functionality that enhances existing features

Comments

@eggnaube
Copy link

New Functionality

Expand all slots on a v-data-table per default. Currently i have to click each row to expand.

Improvements

I have to iterate all rows and emit a click event.

Bugs or Edge Cases it Helps Avoid

Invalid "expanded" value on row.

@zikeji
Copy link

zikeji commented Dec 29, 2017

Sounds like the user wants an "expandAllByDefault" prop of some sort.

A temporary solution: https://codepen.io/anon/pen/aEJeVo

@nekosaur nekosaur added the pending review The issue is still pending disposition label Dec 29, 2017
@johnleider
Copy link
Member

@nekosaur thoughts on this?

@nekosaur
Copy link
Member

I think we should perhaps expose the internal expanded array through a .sync prop, similar to how we do it for selected through the v-model. That way you can easily get the functionality request in this issue, and you get fine-grained external control of expanded rows.

@MateiNenciu
Copy link

+1 for this feature

@nekosaur nekosaur added T: enhancement Functionality that enhances existing features and removed pending review The issue is still pending disposition labels Jan 16, 2018
@nekosaur nekosaur added this to the v1.1.x milestone Jan 16, 2018
@johnleider
Copy link
Member

johnleider commented Jan 16, 2018 via email

@johnleider
Copy link
Member

Is this something you think you can still do for v1.1 @nekosaur ?

@nekosaur nekosaur self-assigned this May 6, 2018
nekosaur added a commit that referenced this issue May 6, 2018
allows one to modify expansion outside of data-iterable components

closes #2890
nekosaur added a commit that referenced this issue May 19, 2018
allows one to modify expansion outside of data-iterable components

closes #2890
@jacekkarczmarczyk jacekkarczmarczyk added the S: has PR The issue has a pending Pull Request label Jun 12, 2018
@KaelWD KaelWD removed this from the v1.1.x milestone Jun 16, 2018
nekosaur added a commit that referenced this issue Jul 9, 2018
allows one to modify expansion outside of data-iterable components

closes #2890
@KaelWD KaelWD removed the S: has PR The issue has a pending Pull Request label Jul 14, 2018
@nekosaur nekosaur mentioned this issue Oct 6, 2018
9 tasks
@nekosaur nekosaur mentioned this issue Nov 26, 2018
9 tasks
@blalan05 blalan05 closed this as completed Apr 2, 2019
@AakifMushtaq
Copy link

Could anyone please let me know if this feature was ever implemented and if so how to use it ? I can't seem the workaround to get to work it is not letting me compile.
Capture

@MestreKarin
Copy link

@AakifMushtaq I got this error too, so I typecast to any and compiled with no errors.

let table: any = this.$refs.dTable;
this.$set(table.expanded, item.name, true);

@VitalickS
Copy link

Try look at this example
<v-data-table :expanded="items" .... >
or
<v-data-table :expanded.sync="copyArrayOfItems" .... >
First way just expand all items; second way for tracking selected items by copyArrayOfItems

@miryamfv
Copy link

miryamfv commented Jan 4, 2021

@VitalickS yes that works

@darkbasic
Copy link

Shouldn't expanded be a v-model instead, like for the selected rows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: enhancement Functionality that enhances existing features
Projects
None yet
Development

No branches or pull requests