Currently facing a challenge and seeking assistance: I have two Vuetify "v-data-tables" 1 - Parent table 2 - Children's table (which is actually a reusable component)
I am in search of a universal code snippet that I can tweak for my project, where every time I click on a row in the Parent table, the Child table will display corresponding details based on ID
I have browsed online for examples but haven't been able to customize them to fit my application. Here is an example link: enter link description here
<template>
<div id="app">
<table-component :data="fetchData">
<table-column show="firstName" label="First name"></table-column>
</table-component>
</div>
</template>
<script>
import axios from 'axios';
export default {
methods: {
async fetchData({ page, filter, sort }) {
const response = await axios.get('/my-endpoint', { page });
// An object that has a `data` and an optional `pagination` property
return response;
}
}
}
</script>