From ec9bd950e84a1f9606497636155603a401bb9409 Mon Sep 17 00:00:00 2001 From: guerler Date: Wed, 30 Aug 2023 19:42:31 +0300 Subject: [PATCH] Remove input cloning, restore key object handling as in current dev (see #16602) --- client/src/components/Form/FormDisplay.vue | 1 - client/src/components/Form/FormRepeat.vue | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/components/Form/FormDisplay.vue b/client/src/components/Form/FormDisplay.vue index 4ab57c878eb0..200a5d32f669 100644 --- a/client/src/components/Form/FormDisplay.vue +++ b/client/src/components/Form/FormDisplay.vue @@ -165,7 +165,6 @@ export default { }); }, onChangeForm() { - this.formInputs = JSON.parse(JSON.stringify(this.formInputs)); this.onChange(true); }, onCloneInputs() { diff --git a/client/src/components/Form/FormRepeat.vue b/client/src/components/Form/FormRepeat.vue index 88617f1864cd..b2cf51a3b384 100644 --- a/client/src/components/Form/FormRepeat.vue +++ b/client/src/components/Form/FormRepeat.vue @@ -4,6 +4,8 @@ import { faCaretDown, faCaretUp, faPlus, faTrashAlt } from "@fortawesome/free-so import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { defineAsyncComponent, nextTick, type PropType } from "vue"; +import { useKeyedObjects } from "@/composables/keyedObjects"; + import FormCard from "./FormCard.vue"; const FormNode = defineAsyncComponent(() => import("./FormInputs.vue")); @@ -82,6 +84,8 @@ function getButtonId(index: number, direction: "up" | "down") { const prefix = getPrefix(index); return `${prefix}_${direction}`; } + +const { keyObject } = useKeyedObjects();