DataTables / Vue

Vue plugin for DataTables
MIT License
61 stars 12 forks source link

Implementation of Child Rows #24

Open mesos001 opened 10 months ago

mesos001 commented 10 months ago

Hi all,

The basic tables are working as follows. https://stackblitz.com/edit/datatables-net-vue3-simple?file=src%2FApp.vue

However, how can "Child Rows" be implemented? https://datatables.net/extensions/staterestore/examples/customisation/childRows.html

We can't use a Vue for in the template to display the HTML for the table body...

AllanJard commented 10 months ago

As in you want to display Vue components inside the child row? You'd need to create a root Vue element and pass it to the render function (apologies if I'm getting the Vue terminology wrong).

I need to look into exactly how to do that myself! I'm certain it is possible, I'm just not sure what the right incantation is.

mesos001 commented 9 months ago

Hi AllanJard,

Thank you for the answer.

Using the render function solved the problem! The code is messy, but I'll leave it below.

https://stackblitz.com/edit/child-rows?file=src%2FApp.vue