Skip to content

Conversation

@J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Nov 11, 2025

Description

fixes #20457

TODO:

  • discussion around PoC approach
  • are we missing some code that would reset sizes[index] when collapsed?
  • minor cleanup

Markup:

<template>
  <v-app>
    <v-data-table-virtual
      :headers="headers"
      :items="items"
      height="400"
      item-value="id"
      show-expand
    >
      <template #expanded-row="{ itemRef }">
        <tr :ref="itemRef">
          <td :colspan="headers.length + 1">
            <div v-for="subItem in subItems" :key="subItem.id">
              {{ subItem.name }}
            </div>
          </td>
        </tr>
      </template>
    </v-data-table-virtual>
  </v-app>
</template>

<script setup>
  const subItems = Array.from({ length: 20 })
    .map((_, index) => ({
      id: index + 1,
      name: `ID ${index + 1}`,
    }))

  const items = [
    ...Array.from({ length: 200 }, (_, index) => ({
      id: index + 1,
      name: `Version ${index + 1}`,
      status: 'Active',
      date: '2024-03-20',
    })),
  ]

  const headers = [
    { title: 'Name', key: 'name' },
    { title: 'Status', key: 'status' },
    { title: 'Date', key: 'date' },
  ]
</script>

@J-Sek J-Sek self-assigned this Nov 11, 2025
@J-Sek J-Sek added T: bug Functionality that does not work as intended/expected C: VDataTableVirtual labels Nov 11, 2025
@J-Sek J-Sek requested a review from KaelWD November 11, 2025 22:51
@J-Sek J-Sek marked this pull request as draft November 11, 2025 23:19
@J-Sek J-Sek added the help wanted We are looking for community help label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: VDataTableVirtual help wanted We are looking for community help T: bug Functionality that does not work as intended/expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report][3.7.1] Scroll bouncing in virtual table with expanded row

2 participants