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] Make it easier to conditionally show the expand button of a v-data-table #19969

Open
simionato-mobisec opened this issue Jun 7, 2024 · 0 comments

Comments

@simionato-mobisec
Copy link

Problem to solve

Right now if we want to conditionally show the expand icon of a v-data-table we have to do this:
https://stackoverflow.com/a/77784371/19271543

Proposed solution

Add a prop to the v-data-table which receives a function and pass to it each item of the table (or we can even use the already existing show-expand prop). Thanks to it we can conditionally decide for each row if we want to show the button or not.
Example:

<v-data-table
  :headers
  :items
  :show-expand="(item) => item.array.length > 0"
></v-data-table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant