Merge pull request 'Refactor data-table component to use let for options and table variables' (#117) from fix/sintax-error into development

Reviewed-on: ADUANASOFT/anexo76#117
This commit is contained in:
2026-02-09 18:03:19 +00:00
2 changed files with 4 additions and 3 deletions

View File

@@ -103,6 +103,7 @@
</thead>
<tbody>
{#each filteredItems as item}
{@const Icon = getCategoryIcon(item.type)}
<tr class="border-b hover:bg-muted/50 transition-colors">
<td class="p-3 font-mono font-bold text-primary">{item.key}</td>
@@ -110,7 +111,7 @@
<td class="p-3">
<div class="flex items-center gap-1 text-xs text-muted-foreground">
<svelte:component this={getCategoryIcon(item.type)} class="h-3 w-3" />
<Icon class="h-3 w-3" />
{item.type}
</div>
</td>

View File

@@ -21,7 +21,7 @@
let scrollContainer: HTMLDivElement;
let observer: IntersectionObserver;
const options = $derived<TableOptions<TData>>({
let options = $derived<TableOptions<TData>>({
get data() {
return data;
},
@@ -29,7 +29,7 @@
getCoreRowModel: getCoreRowModel()
});
const table = createSvelteTable(options);
let table = $derived(createSvelteTable(options));
onMount(() => {
if (!loadMore) return;