System fields:
id
,
created
,
updated
{#if collection.$isAuth}
,
username
,
email
,
emailVisibility
,
verified
{/if}
.
{#each collection.schema as field, i (field)}
{
// blank drag placeholder
if (!e.detail) {
return;
}
const ghost = e.detail.target;
ghost.style.opacity = 0;
setTimeout(() => {
ghost?.style?.removeProperty("opacity"); // restore
}, 0);
e.detail.dataTransfer.setDragImage(ghost, 0, 0);
}}
on:sort={() => {
// reset errors since the schema keys index has changed
setErrors({});
}}
>
removeField(i)}
on:rename={(e) => replaceIndexesColumn(e.detail.oldName, e.detail.newName)}
/>
{/each}
newField(e.detail)} />