fix(editor): Fix multiOptions parameters resetting on initial load (#6903)

* fix: fix multiOptions parameters resetting on initial load

* chore: add comment
This commit is contained in:
Alex Grozav 2023-08-10 12:28:41 +03:00 committed by GitHub
parent f3fce48155
commit 49867c2b17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,6 +91,7 @@
<node-webhooks :node="node" :nodeType="nodeType" />
<parameter-input-list
v-if="nodeValuesInitialized"
:parameters="parametersNoneSetting"
:hideDelete="true"
:nodeValues="nodeValues"
@ -366,6 +367,7 @@ export default defineComponent({
notes: '',
parameters: {},
} as INodeParameters,
nodeValuesInitialized: false, // Used to prevent nodeValues from being overwritten by defaults on reopening ndv
nodeSettings: [
{
@ -824,8 +826,9 @@ export default defineComponent({
* Sets the values of the active node in the internal settings variables
*/
setNodeValues() {
// No node selected
if (!this.node) {
// No node selected
this.nodeValuesInitialized = true;
return;
}
@ -923,6 +926,8 @@ export default defineComponent({
} else {
this.nodeValid = false;
}
this.nodeValuesInitialized = true;
},
onMissingNodeTextClick(event: MouseEvent) {
if ((event.target as Element).localName === 'a') {