Skip to content

Commit

Permalink
Replace Virtual Table
Browse files Browse the repository at this point in the history
v-data-table-virtual says on the tin that it "relies on all data being available locally but unlike the standard data-table it uses virtualization to only render a small portion of the rows." This makes it not a good fit for use showing alert detail rows in the ungrouped Alerts table. We're only rendering a small portion of rows (a little over half) upon expanding a row. The behavior appears glitchy rather than intended when you expand a second row and the first row fills out it's missing rows.

Now the table is the non-virtual variant with items-per-page set to -1 so we see every row as expected.
  • Loading branch information
coreyogburn committed Jan 13, 2025
1 parent eee9f76 commit 77a532b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ <h4 v-if="loaded" :data-aid="'event_total_' + category">{{ i18n.eventTotal }} {{
<template #expanded-row="{ columns, item }">
<tr>
<td :colspan="columns.length" class="px-0" :data-aid="'events_fields_' + category">
<v-data-table-virtual density="compact" hide-default-header hide-default-footer :headers="expandedHeaders" :items="getExpandedData(item)">
<v-data-table density="compact" hide-default-header hide-default-footer :headers="expandedHeaders" :items="getExpandedData(item)" items-per-page="-1">
<template #item="{ item: kvp }">
<tr :data-aid="'events_field_' + category + '_' + kvp.key" class="pt-3">
<td class="expansion">
Expand All @@ -818,7 +818,7 @@ <h4 v-if="loaded" :data-aid="'event_total_' + category">{{ i18n.eventTotal }} {{
</td>
</tr>
</template>
</v-data-table-virtual>
</v-data-table>
</td>
</tr>
</template>
Expand Down

0 comments on commit 77a532b

Please sign in to comment.