From 4daa66aa9dbfd23800d79e46741efa989adbbabd Mon Sep 17 00:00:00 2001 From: acazares Date: Mon, 9 Feb 2026 12:00:47 -0600 Subject: [PATCH] Refactor data-table component to use let for options and table variables --- .../goods/modales/material-type-selector-dialog.svelte | 3 ++- frontend/src/lib/components/dashboard/seal/data-table.svelte | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/dashboard/goods/modales/material-type-selector-dialog.svelte b/frontend/src/lib/components/dashboard/goods/modales/material-type-selector-dialog.svelte index 3e03b975..33ca5f02 100644 --- a/frontend/src/lib/components/dashboard/goods/modales/material-type-selector-dialog.svelte +++ b/frontend/src/lib/components/dashboard/goods/modales/material-type-selector-dialog.svelte @@ -103,6 +103,7 @@ {#each filteredItems as item} + {@const Icon = getCategoryIcon(item.type)} {item.key} @@ -110,7 +111,7 @@
- + {item.type}
diff --git a/frontend/src/lib/components/dashboard/seal/data-table.svelte b/frontend/src/lib/components/dashboard/seal/data-table.svelte index 2438370f..207266e0 100644 --- a/frontend/src/lib/components/dashboard/seal/data-table.svelte +++ b/frontend/src/lib/components/dashboard/seal/data-table.svelte @@ -21,7 +21,7 @@ let scrollContainer: HTMLDivElement; let observer: IntersectionObserver; - const options = $derived>({ + let options = $derived>({ get data() { return data; }, @@ -29,7 +29,7 @@ getCoreRowModel: getCoreRowModel() }); - const table = createSvelteTable(options); + let table = $derived(createSvelteTable(options)); onMount(() => { if (!loadMore) return;