mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
perf(data-table): only render table row content when expanded (#1211)
Closes #1209
This commit is contained in:
parent
b4e7e735b3
commit
051a8702e3
1 changed files with 9 additions and 7 deletions
|
@ -497,6 +497,7 @@
|
||||||
parentRowId = null;
|
parentRowId = null;
|
||||||
}}"
|
}}"
|
||||||
>
|
>
|
||||||
|
{#if expandedRows[row.id] && !nonExpandableRowIds.includes(row.id)}
|
||||||
<TableCell
|
<TableCell
|
||||||
colspan="{selectable ? headers.length + 2 : headers.length + 1}"
|
colspan="{selectable ? headers.length + 2 : headers.length + 1}"
|
||||||
>
|
>
|
||||||
|
@ -504,6 +505,7 @@
|
||||||
<slot name="expanded-row" row="{row}" />
|
<slot name="expanded-row" row="{row}" />
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
{/if}
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue