mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
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:
parent
f3fce48155
commit
49867c2b17
|
@ -91,6 +91,7 @@
|
||||||
<node-webhooks :node="node" :nodeType="nodeType" />
|
<node-webhooks :node="node" :nodeType="nodeType" />
|
||||||
|
|
||||||
<parameter-input-list
|
<parameter-input-list
|
||||||
|
v-if="nodeValuesInitialized"
|
||||||
:parameters="parametersNoneSetting"
|
:parameters="parametersNoneSetting"
|
||||||
:hideDelete="true"
|
:hideDelete="true"
|
||||||
:nodeValues="nodeValues"
|
:nodeValues="nodeValues"
|
||||||
|
@ -366,6 +367,7 @@ export default defineComponent({
|
||||||
notes: '',
|
notes: '',
|
||||||
parameters: {},
|
parameters: {},
|
||||||
} as INodeParameters,
|
} as INodeParameters,
|
||||||
|
nodeValuesInitialized: false, // Used to prevent nodeValues from being overwritten by defaults on reopening ndv
|
||||||
|
|
||||||
nodeSettings: [
|
nodeSettings: [
|
||||||
{
|
{
|
||||||
|
@ -824,8 +826,9 @@ export default defineComponent({
|
||||||
* Sets the values of the active node in the internal settings variables
|
* Sets the values of the active node in the internal settings variables
|
||||||
*/
|
*/
|
||||||
setNodeValues() {
|
setNodeValues() {
|
||||||
|
// No node selected
|
||||||
if (!this.node) {
|
if (!this.node) {
|
||||||
// No node selected
|
this.nodeValuesInitialized = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -923,6 +926,8 @@ export default defineComponent({
|
||||||
} else {
|
} else {
|
||||||
this.nodeValid = false;
|
this.nodeValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.nodeValuesInitialized = true;
|
||||||
},
|
},
|
||||||
onMissingNodeTextClick(event: MouseEvent) {
|
onMissingNodeTextClick(event: MouseEvent) {
|
||||||
if ((event.target as Element).localName === 'a') {
|
if ((event.target as Element).localName === 'a') {
|
||||||
|
|
Loading…
Reference in a new issue