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:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user