Skip to content

Commit 324dccc

Browse files
ref: remove the custom toggle row expansion function
1 parent fb9201c commit 324dccc

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

examples/vue/grouping/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Vite App</title>
8-
<script src="https://cdn.tailwindcss.com"></script>
98
</head>
109
<body>
1110
<div id="app"></div>

examples/vue/grouping/src/App.vue

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,6 @@ const table = useVueTable({
131131
},
132132
})
133133
134-
// Toggle row expanded state
135-
const toggleRowExpanded = (id: string): void => {
136-
const currentExpanded = expanded.value as Record<string, boolean>
137-
expanded.value = {
138-
...currentExpanded,
139-
[id]: !currentExpanded[id],
140-
}
141-
}
142-
143134
// Group by status
144135
const groupByStatus = (): void => {
145136
grouping.value = ['status']
@@ -211,7 +202,7 @@ const clearGrouping = (): void => {
211202
<div v-if="cell.getIsGrouped()" class="grouped-cell">
212203
<button
213204
class="expand-button"
214-
@click="toggleRowExpanded(row.id)"
205+
@click="row.getToggleExpandedHandler()()"
215206
>
216207
<span v-if="row.getIsExpanded()" class="icon">👇</span>
217208
<span v-else class="icon">👉</span>

0 commit comments

Comments
 (0)