{#if show_headers}
{#each fields as field, field_index}
{field.label ?? field.name}
{/each}
TODO
{/if}
{#each rows as row, row_index}
{#each fields as field, field_index} {@const cell_data = row.data[field_index]} {@const cell_coords: Coords = [row_index, field_index]} {@const cell_selected = selections.some( (sel_coords) => coords_eq(sel_coords, cell_coords), )}
on_cell_click?.(ev, cell_coords)} ondblclick={() => on_cell_dblclick?.(cell_coords)} role="gridcell" style:width={`${field.width_px}px`} tabindex="-1" > {#if cell_data.t === "Text"}
{cell_data.c}
{:else if cell_data.t === "Uuid"}
{cell_data.c}
{:else}
UNKNOWN
{/if}
{/each}
{/each}