fix: make autodatatable more resilient

This commit is contained in:
Ruben Fiszel
2024-04-05 20:40:18 +02:00
parent c15b5a4f17
commit e9570fa52a
@@ -288,7 +288,7 @@
<Cell head first={true} last={false}>
<input type="checkbox" class="!w-4 !h-4" on:change={handleSelectAllChange} />
</Cell>
{#each Object.keys(data[0].rowData ?? {}) ?? [] as key, index}
{#each Object.keys(data?.[0]?.rowData ?? {}) ?? [] as key, index}
<Cell head last={index == Object.keys(objects[0] ?? {}).length - 1}>
<div class="flex flex-row gap-1 items-center">
{key}