bugfix freezed array -> make deep copy of contentBlock
This commit is contained in:
parent
48e724f4e4
commit
41bf6efce1
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<modal>
|
||||
<content-block-title-input slot="header" v-on:update-title="updateTitle" :title="contentBlock.title"
|
||||
<content-block-title-input slot="header" v-on:update-title="updateTitle" :title="localContentBlock.title"
|
||||
:error="error"></content-block-title-input>
|
||||
<add-content-element class="content-block-form__add"
|
||||
v-on:add-element="addElement"
|
||||
:index="-1"
|
||||
></add-content-element>
|
||||
<div v-for="(element, index) in contentBlock.contents" :key="index" class="content-block-form__element">
|
||||
<div v-for="(element, index) in localContentBlock.contents" :key="index" class="content-block-form__element">
|
||||
<component
|
||||
class="content-block-form__element-component"
|
||||
:is="type(element)"
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
data() {
|
||||
return {
|
||||
error: false,
|
||||
localContentBlock: Object.assign({}, this.contentBlock)
|
||||
localContentBlock: JSON.parse(JSON.stringify(this.contentBlock))
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue