Skip to content

Commit

Permalink
Remove input cloning, restore key object handling as in current dev (…
Browse files Browse the repository at this point in the history
…see #16602)
  • Loading branch information
guerler committed Aug 30, 2023
1 parent df9f356 commit ec9bd95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion client/src/components/Form/FormDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ export default {
});
},
onChangeForm() {
this.formInputs = JSON.parse(JSON.stringify(this.formInputs));
this.onChange(true);
},
onCloneInputs() {
Expand Down
6 changes: 5 additions & 1 deletion client/src/components/Form/FormRepeat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -82,6 +84,8 @@ function getButtonId(index: number, direction: "up" | "down") {
const prefix = getPrefix(index);
return `${prefix}_${direction}`;
}
const { keyObject } = useKeyedObjects();
</script>

<template>
Expand All @@ -93,7 +97,7 @@ function getButtonId(index: number, direction: "up" | "down") {

<FormCard
v-for="(cache, cacheId) in props.input.cache"
:key="cacheId"
:key="keyObject(cache)"
data-description="repeat block"
class="card"
:title="getTitle(cacheId)">
Expand Down

0 comments on commit ec9bd95

Please sign in to comment.