Skip to content

Commit

Permalink
Make tags reactive to model table page switching
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed May 13, 2024
1 parent 7a828ab commit 2ee9622
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/lib/components/ModelTable/ModelTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
import Th from './Th.svelte';
import ThFilter from './ThFilter.svelte';
import { formatDateOrDateTime } from '$lib/utils/datetime';
$: data = source.body.map((item: Record<string, any>, index: number) => {
return { ...item, meta: source.meta ? { ...source.meta[index] } : undefined };
});
Expand Down Expand Up @@ -180,7 +181,7 @@
<!-- Body -->
<tbody class="table-body {regionBody}">
{#each $rows as row, rowIndex}
{@const meta = source.meta ? source.meta[rowIndex] : source.body[rowIndex]}
{@const meta = row.meta ? row.meta : row}
<!-- Row -->
<!-- prettier-ignore -->
<tr
Expand Down

0 comments on commit 2ee9622

Please sign in to comment.