{#each _headers as { value, id }, i (id)} {/each} {#each data as row, i (row)} {#each row as { value, id }, j (id)} {/each} {/each}
handle_sort(i), dblclick: () => edit_header(id) }} aria-sort={get_sort_status(value, sort_by, sort_direction)} class="relative after:absolute after:opacity-0 after:content-['▲'] after:ml-2 after:inset-y-0 after:h-[1.05rem] after:m-auto relative px-6 py-3 text-left text-xs font-medium dark:text-gray-100 uppercase tracking-wider" class:sorted={sort_by === i} class:des={sort_by === i && sort_direction === "des"} > {#if header_edit === id} currentTarget.setAttribute("tabindex", "-1")} /> {/if} {value}
start_edit(id)} on:click={() => handle_cell_click(id)} on:keydown={(e) => handle_keydown(e, i, j, id)} bind:this={els[id].cell} on:blur={({ currentTarget }) => currentTarget.setAttribute("tabindex", "-1")} >
{#if editing === id} currentTarget.setAttribute("tabindex", "-1")} /> {/if} {value}
{#if editable}
{/if}