add unique keys for content

This commit is contained in:
2024-01-11 07:25:04 +01:00
parent a0d55eb5a1
commit 7e31c9d34e
2 changed files with 41 additions and 72 deletions

View File

@@ -39,16 +39,17 @@
v-model="value.items"
@start="drag = true"
@end="
drag = false; onChange()
drag = false;
onChange()
"
group="people"
>
<template #item="{ element, index }">
<div class="pb_section table-bordered p-2 pl-3 pr-3 mb-3 rounded">
<component
@itemRemoved="removeItem"
:key="index"
:key="contentId+'_'+index"
:id="contentId+'_'+index"
v-bind:is="element.name"
v-bind:value="element"
v-model="value.items[index]"
@@ -99,7 +100,13 @@ import DropdownSectionSection from './DropdownSectionSection.vue'
export default {
data: function () {
return { opcja: '', modalAddBox: false, drag: false, modalColumnsSettings: false }
return {
opcja: '',
modalAddBox: false,
drag: false,
modalColumnsSettings: false,
contentId: 'content' + Math.round(Math.random() * 1000)
}
},
props: { value: Object },
emits: ['update:modelValue'],