Need to add sorting from smallest to largest and vice versa for the deps and amount fields.
Is it possible to add a filter to child columns using :sort-by?
I didn’t find a similar example in the documentation for sorting by children columns
Multi sort
example const header
[
{
"title": "Net",
"key": "utmcompagin"
},
{
"title": "04-29",
"key": "2024-04-29",
"align": "center",
"children": [
{
"title": "Amount",
"value": "2024-04-29 Amount"
},
{
"title": "Deps",
"value": "2024-04-29 Deps"
}
]
}
]
<v-data-table
:headers="headers"
:items="tableData"
height="1000"
sticky
:items-per-page="-1"
:items-per-page-options="[-1, 10, 20, 50]"
density="compact"
class="elevation-1"
:search="search"
:loading="loading"
>
tableData
[
{
"utmcompagin": "Total",
"2024-04-29 Amount": "463.20$",
"2024-04-29 Deps": 50
},
{
"utmcompagin": "Others",
"2024-04-29 Amount": "162.55$",
"2024-04-29 Deps": 16
},
{
"utmcompagin": "fapnetFastOrange",
"2024-04-29 Amount": "12.15$",
"2024-04-29 Deps": 1
},
{
"utmcompagin": "10.2net",
"2024-04-29 Amount": "68.49$",
"2024-04-29 Deps": 8
},
{
"utmcompagin": "whiteVpnSite",
"2024-04-29 Amount": "41.66$",
"2024-04-29 Deps": 6
},
{
"utmcompagin": "9net",
"2024-04-29 Amount": "22.22$",
"2024-04-29 Deps": 2
},
]