optimize form render with many fields

This commit is contained in:
Pete Matsyburka
2023-12-31 17:23:27 +02:00
parent fd4e15003a
commit f358f24abb
5 changed files with 46 additions and 13 deletions
+6 -4
View File
@@ -205,7 +205,7 @@
<div
v-if="withFieldsList"
class="relative w-80 flex-none mt-1 pr-4 pl-0.5 hidden md:block"
:class="drawField ? 'overflow-hidden' : 'overflow-auto'"
:class="drawField ? 'overflow-hidden' : 'overflow-y-auto overflow-x-hidden'"
>
<div
v-if="drawField"
@@ -888,9 +888,11 @@ export default {
})
},
save () {
if (this.$el.closest('template-builder')) {
this.$el.closest('template-builder').dataset.template = JSON.stringify(this.template)
}
this.$nextTick(() => {
if (this.$el.closest('template-builder')) {
this.$el.closest('template-builder').dataset.template = JSON.stringify(this.template)
}
})
this.pushUndo()