Unique constraints and indexes ({collection?.indexes?.length || 0})
{#if $errors?.indexes?.message}
{/if}
{#each collection?.indexes || [] as rawIndex, i}
{@const parsed = CommonHelper.parseIndex(rawIndex)}
{/each}
{
for (let i = 0; i < collection.indexes.length; i++) {
if (collection.indexes[i] == e.detail) {
collection.indexes.splice(i, 1);
removeError("indexes." + i);
break;
}
}
collection.indexes = collection.indexes;
}}
on:submit={(e) => {
// clear generic error
if ($errors.indexes?.message) {
removeError("indexes");
}
pushOrReplace(e.detail.old, e.detail.new);
}}
/>