{#each table.getHeaderGroups() as headerGroup (headerGroup.id)} {@const headerList = headerGroup.headers} {@const lastHeaderColId = headerList[headerList.length - 1]?.column.id}
{#each headerList as header (header.id)} {@const colId = header.column.id}
{#if !header.isPlaceholder}
{/if}
{/each}
{/each}
{#if table.getRowModel().rows.length} {#each table.getRowModel().rows as row (row.id)} {@const visibleCells = row.getVisibleCells()} {@const lastCellColId = visibleCells[visibleCells.length - 1]?.column.id}
onRowClick?.(row.original)} > {#each visibleCells as cell (cell.id)} {@const colId = cell.column.id}
{/each}
{/each} {:else}
{emptyMessage}
{/if} {#if hasMore}
{#if loading}
Cargando más registros...
{:else}
Desplázate para cargar más
{/if}
{/if}