{#if !loaded}
{:else}
{#if fields.length} {#if showEditColumn}
{editColumnTitle || ""}
{/if} {#each fields as field}
sortBy(schema[field])} >
{getDisplayName(schema[field])}
{#if schema[field]?.autocolumn} {/if} {#if sortColumn === field} {/if} {#if allowEditColumns && schema[field]?.editable !== false} editColumn(e, field)} > {/if}
{/each} {/if} {#if sortedRows?.length} {#each sortedRows as row, idx}
dispatch("click", row)} on:click={() => toggleSelectRow(row)} > {#if idx >= firstVisibleRow && idx <= lastVisibleRow} {#if showEditColumn}
toggleSelectRow(row)} onEdit={e => editRow(e, row)} {allowSelectRows} {allowEditRows} />
{/if} {#each fields as field}
{/each} {:else}
{/if}
{/each} {:else}
No rows found
{/if}
{/if}