Skip to content

Commit

Permalink
ref: remove the custom toggle row expansion function
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshilPatel007 committed Mar 4, 2025
1 parent fb9201c commit 324dccc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion examples/vue/grouping/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<div id="app"></div>
Expand Down
11 changes: 1 addition & 10 deletions examples/vue/grouping/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,6 @@ const table = useVueTable({
},
})
// Toggle row expanded state
const toggleRowExpanded = (id: string): void => {
const currentExpanded = expanded.value as Record<string, boolean>
expanded.value = {
...currentExpanded,
[id]: !currentExpanded[id],
}
}
// Group by status
const groupByStatus = (): void => {
grouping.value = ['status']
Expand Down Expand Up @@ -211,7 +202,7 @@ const clearGrouping = (): void => {
<div v-if="cell.getIsGrouped()" class="grouped-cell">
<button
class="expand-button"
@click="toggleRowExpanded(row.id)"
@click="row.getToggleExpandedHandler()()"
>
<span v-if="row.getIsExpanded()" class="icon">👇</span>
<span v-else class="icon">👉</span>
Expand Down

0 comments on commit 324dccc

Please sign in to comment.