fix: fix array static input editor initialization

This commit is contained in:
Ruben Fiszel
2023-08-12 02:35:57 +02:00
parent 0449b3be03
commit 4dcf7ae088
2 changed files with 4 additions and 4 deletions
@@ -187,7 +187,6 @@
{/if}
{#if editableSchema}
<label class="text-secondary">
Description
<textarea
class="mb-1"
use:autosize
@@ -109,10 +109,11 @@
if ((e.key === 'Enter' || e.key === ' ') && dragDisabled) dragDisabled = false
}
let items =
componentInput.value?.map((item, index) => {
let items = (Array.isArray(componentInput.value) ? componentInput.value : []).map(
(item, index) => {
return { value: item, id: generateRandomString() }
}) ?? []
}
)
$: items && handleItemsChange()