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

Please provide a DataTable example with nested arrays #4292

Open
urbgimtam opened this issue May 29, 2024 · 0 comments
Open

Please provide a DataTable example with nested arrays #4292

urbgimtam opened this issue May 29, 2024 · 0 comments
Labels
docs packages/docs

Comments

@urbgimtam
Copy link

urbgimtam commented May 29, 2024

The examples of DataTable are great, but they don't showcase a typical scenario of nested arrays.

Example: structure:

const profile = [
{
  id: 1,
  name: "John",
  tags: [
    'surfer', 'loves nuxt'
  ]
},
{
  id: 2,
  name: "Joe",
  tags: [
    'musician', 'loves vue'
  ]
}, ...
]

In the past I've done the following: placed the 'column' key as 'tags', and then use template slots with {rowData}, then v-for to display each tag. Feels hacky, and also filtering stops working...

Is this the recommended approach?

That's why IMO it is important to improve the docs with an example like this.

@urbgimtam urbgimtam added the docs packages/docs label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs packages/docs
Projects
None yet
Development

No branches or pull requests

1 participant