Remount table when columns change to avoid rare crashes
This commit is contained in:
parent
c01b9af1f0
commit
42d2a71395
|
@ -270,13 +270,14 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
{#key fields?.length}
|
||||
<div
|
||||
class="wrapper"
|
||||
class:wrapper--quiet={quiet}
|
||||
class:wrapper--compact={compact}
|
||||
bind:offsetHeight={height}
|
||||
style={`--row-height: ${rowHeight}px; --header-height: ${headerHeight}px;`}
|
||||
>
|
||||
>
|
||||
{#if !loaded}
|
||||
<div class="loading" style={heightStyle}>
|
||||
<ProgressCircle />
|
||||
|
@ -306,8 +307,8 @@
|
|||
class:noBorderHeader={!showHeaderBorder}
|
||||
class:spectrum-Table-headCell--alignCenter={schema[field]
|
||||
.align === "Center"}
|
||||
class:spectrum-Table-headCell--alignRight={schema[field].align ===
|
||||
"Right"}
|
||||
class:spectrum-Table-headCell--alignRight={schema[field]
|
||||
.align === "Right"}
|
||||
class:is-sortable={schema[field].sortable !== false}
|
||||
class:is-sorted-desc={sortColumn === field &&
|
||||
sortOrder === "Descending"}
|
||||
|
@ -418,7 +419,8 @@
|
|||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/key}
|
||||
|
||||
<style>
|
||||
/* Wrapper */
|
||||
|
|
Loading…
Reference in New Issue