Don't show header in spectrum table unless rows exist

This commit is contained in:
Andrew Kingston 2021-04-12 15:15:35 +01:00
parent 28b4e178fe
commit 1c1f71ebfb
1 changed files with 48 additions and 46 deletions

View File

@ -153,6 +153,7 @@
class="container">
<div style={contentStyle}>
<table class="spectrum-Table" class:spectrum-Table--quiet={quiet}>
{#if sortedRows?.length}
<thead class="spectrum-Table-head">
<tr>
{#if showEditColumn}
@ -200,6 +201,7 @@
{/each}
</tr>
</thead>
{/if}
<tbody class="spectrum-Table-body">
{#if sortedRows?.length}
{#each sortedRows as row, idx}