Skip to content

Commit 0ecabce

Browse files
committed
docs: avoid null/* as group key
1 parent ecfe69a commit 0ecabce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/docs/src/examples/v-data-table/prop-grouping.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
const sortBy = ref([{ key: 'name', order: 'asc' }])
3030
const groupBy = ref([{ key: 'category', order: 'asc' }, { key: 'status', order: 'asc' }])
3131
32-
const groupKey = ({ key, value, parentKey }) => `${parentKey}/${key}:${value}`
32+
const groupKey = ({ key, value, parentKey }) => `${parentKey ?? 'root'}/${key}:${value}`
3333
3434
const headers = [
3535
{ key: 'data-table-group', title: 'Category' },
@@ -187,7 +187,7 @@
187187
}),
188188
methods: {
189189
groupKey ({ key, value, parentKey }) {
190-
return `${parentKey}/${key}:${value}`
190+
return `${parentKey ?? 'root'}/${key}:${value}`
191191
},
192192
},
193193
}

0 commit comments

Comments
 (0)