Skip to content

Commit

Permalink
fix(editor): Fix multiOptions parameters resetting on initial load (#…
Browse files Browse the repository at this point in the history
…6903)

* fix: fix multiOptions parameters resetting on initial load

* chore: add comment
  • Loading branch information
alexgrozav authored Aug 10, 2023
1 parent f3fce48 commit 49867c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/editor-ui/src/components/NodeSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<node-webhooks :node="node" :nodeType="nodeType" />

<parameter-input-list
v-if="nodeValuesInitialized"
:parameters="parametersNoneSetting"
:hideDelete="true"
:nodeValues="nodeValues"
Expand Down Expand Up @@ -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: [
{
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -923,6 +926,8 @@ export default defineComponent({
} else {
this.nodeValid = false;
}
this.nodeValuesInitialized = true;
},
onMissingNodeTextClick(event: MouseEvent) {
if ((event.target as Element).localName === 'a') {
Expand Down

0 comments on commit 49867c2

Please sign in to comment.