mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(Compare Datasets Node): UI tweaks and fixes
This commit is contained in:
@@ -13,7 +13,7 @@ export class CompareDatasets implements INodeType {
|
||||
name: 'compareDatasets',
|
||||
icon: 'file:compare.svg',
|
||||
group: ['transform'],
|
||||
version: 1,
|
||||
version: [1, 2],
|
||||
description: 'Compare two inputs for changes',
|
||||
defaults: { name: 'Compare Datasets' },
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
|
||||
@@ -94,6 +94,19 @@ export class CompareDatasets implements INodeType {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName: 'Fuzzy Compare',
|
||||
name: 'fuzzyCompare',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description:
|
||||
"Whether to tolerate small type differences when comparing fields. E.g. the number 3 and the string '3' are treated as the same.",
|
||||
displayOptions: {
|
||||
show: {
|
||||
'@version': [2],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Prefer',
|
||||
name: 'preferWhenMix',
|
||||
@@ -155,6 +168,11 @@ export class CompareDatasets implements INodeType {
|
||||
default: false,
|
||||
description:
|
||||
"Whether to tolerate small type differences when comparing fields. E.g. the number 3 and the string '3' are treated as the same.",
|
||||
displayOptions: {
|
||||
hide: {
|
||||
'@version': [2],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Disable Dot Notation',
|
||||
@@ -194,6 +212,12 @@ export class CompareDatasets implements INodeType {
|
||||
|
||||
const options = this.getNodeParameter('options', 0, {});
|
||||
|
||||
options.nodeVersion = this.getNode().typeVersion;
|
||||
|
||||
if (options.nodeVersion === 2) {
|
||||
options.fuzzyCompare = this.getNodeParameter('fuzzyCompare', 0, false) as boolean;
|
||||
}
|
||||
|
||||
const input1 = checkInput(
|
||||
this.getInputData(0),
|
||||
matchFields.map((pair) => pair.field1),
|
||||
|
||||
Reference in New Issue
Block a user