Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading