{#if checkedKeys} {/if} {#each columnList as col} {/each} {#if filters} {#if checkedKeys} {/if} {#each columnList as col} {/each} {/if} {#each sortedRows as gitem, groupIndex} {#if gitem.group} {/if} {#if !collapsedGroupIndexes.includes(groupIndex)} {#each gitem.rows as row} {@const index = _.indexOf(flatRowsShown, row)} { if (selectable) { if (selectionMode == 'index') { selectedIndex = index; } else { selectedKey = extractTableItemKey(row); } domTable.focus(); } if (clickable) { dispatch('clickrow', row); } }} > {#if checkedKeys} {/if} {#each columnList as col} {@const rowProps = { ...col.props, ...(col.getProps ? col.getProps(row) : null) }} {/each} {/each} {/if} {/each} {#if emptyMessage && sortedRows.length == 0} {/if}
checkedKeys.includes(extractTableItemKey(r)))} on:change={e => { if (e.target['checked']) onSetCheckedKeys(checkableFlatRowsShown.map(r => extractTableItemKey(r))); else onSetCheckedKeys([]); }} /> { if (col.sortable) { if (sortedByField == col.fieldName) { if (sortOrderIsDesc) { sortOrderIsDesc = false; sortedByField = null; } else { sortOrderIsDesc = true; } } else { sortOrderIsDesc = false; sortedByField = col.fieldName; } } }} > {col.header || ''} {#if sortedByField == col.fieldName} {/if}
{#if col.filterable} filters.update(f => ({ ...f, [col.fieldName]: value }))} placeholder="Data filter" /> {/if}
{ if (collapsedGroupIndexes.includes(groupIndex)) { collapsedGroupIndexes = collapsedGroupIndexes.filter(x => x != groupIndex); } else { collapsedGroupIndexes = [...collapsedGroupIndexes, groupIndex]; } }} > {gitem.group} ({gitem.rows.length})
{#if itemSupportsCheckbox(row)} { if (e.target['checked']) onSetCheckedKeys(_.uniq([...checkedKeys, extractTableItemKey(row)])); else onSetCheckedKeys(checkedKeys.filter(x => x != extractTableItemKey(row))); }} /> {/if} {#if col.component} {:else if col.formatter} {col.formatter(row)} {:else if col.slot != null} {#key row[col.slotKey] || 'key'} {#if col.slot == -1} {:else if col.slot == 0} {:else if col.slot == 1} {:else if col.slot == 2} {:else if col.slot == 3} {:else if col.slot == 4} {:else if col.slot == 5} {:else if col.slot == 6} {:else if col.slot == 7} {:else if col.slot == 8} {:else if col.slot == 9} {/if} {/key} {:else} {row[col.fieldName] || ''} {/if}
{emptyMessage}