Skip to content

Commit 0086659

Browse files
committed
docs(table): only expand the first row to save room in tree data example
1 parent 576c727 commit 0086659

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/app/components/content/examples/table/TableTreeDataExample.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,21 @@ const columns: TableColumn<Payment>[] = [{
137137
return h('div', { class: 'text-right font-medium' }, formatted)
138138
}
139139
}]
140+
141+
const expanded = ref({ 0: true })
140142
</script>
141143

142144
<template>
143145
<UTable
146+
v-model:expanded="expanded"
144147
:data="data"
145148
:columns="columns"
146149
:get-sub-rows="row => row.children"
147-
expanded
148150
sticky
149-
class="flex-1 h-96"
151+
class="flex-1"
150152
:ui="{
151153
base: 'border-separate border-spacing-0',
154+
tbody: '[&>tr]:last:[&>td]:border-b-0',
152155
tr: 'group',
153156
td: 'empty:p-0 group-has-[td:not(:empty)]:border-b border-default'
154157
}"

0 commit comments

Comments
 (0)