npm install @acarat/vue-grouped-table
import { GroupedTable } from "@acarat/vue-grouped-table";
<GroupedTable :headers="[
'city',
'name',
'age',
'genre'
]"
:entries="[
{ city: 'Dublin', name: 'Antoine', age: 23, genre: 'M' },
{ city: 'Dublin', name: 'Margaux', age: 24, genre: 'F' },
{ city: 'Nantes', name: 'Mattis', age: 23, genre: 'M' },
{ city: 'Nantes', name: 'Hugo', age: 24, genre: 'M' },
{ city: 'Nantes', name: 'Laurie', age: 23, genre: 'F' },
{ city: 'Marrakech', name: 'Amr', age: 25, genre: 'M' }
]"
/>
headers must be an Array containing the headers of the table, ie the properties by which the data is grouped.
entries is the raw data itself and must be an Array of Object.