mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(core): Introduce simplified node versioning (#3205)
* ✨ Introduce simple node versioning * ⚡ Add example how to read version in node-code for custom logic * 🐛 Fix setting of parameters * 🐛 Fix another instance where it sets the wrong parameter * ⚡ Remove unnecessary TOODs * ⚡ Revert Set Node example changes * ;rotating_light: Add test
This commit is contained in:
@@ -89,7 +89,7 @@ import {
|
||||
NodeParameterValue,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { IUpdateInformation } from '@/Interface';
|
||||
import { INodeUi, IUpdateInformation } from '@/Interface';
|
||||
|
||||
import MultipleParameter from '@/components/MultipleParameter.vue';
|
||||
import { genericHelpers } from '@/components/mixins/genericHelpers';
|
||||
@@ -124,6 +124,9 @@ export default mixins(
|
||||
filteredParameterNames (): string[] {
|
||||
return this.filteredParameters.map(parameter => parameter.name);
|
||||
},
|
||||
node (): INodeUi {
|
||||
return this.$store.getters.activeNode;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
multipleValues (parameter: INodeProperties): boolean {
|
||||
@@ -213,13 +216,13 @@ export default mixins(
|
||||
if (this.path) {
|
||||
rawValues = JSON.parse(JSON.stringify(this.nodeValues));
|
||||
set(rawValues, this.path, nodeValues);
|
||||
return this.displayParameter(rawValues, parameter, this.path);
|
||||
return this.displayParameter(rawValues, parameter, this.path, this.node);
|
||||
} else {
|
||||
return this.displayParameter(nodeValues, parameter, '');
|
||||
return this.displayParameter(nodeValues, parameter, '', this.node);
|
||||
}
|
||||
}
|
||||
|
||||
return this.displayParameter(this.nodeValues, parameter, this.path);
|
||||
return this.displayParameter(this.nodeValues, parameter, this.path, this.node);
|
||||
},
|
||||
valueChanged (parameterData: IUpdateInformation): void {
|
||||
this.$emit('valueChanged', parameterData);
|
||||
|
||||
Reference in New Issue
Block a user