fix(Data Table Node): Update ResourceMapper Copy (no-changelog) (#19048)

This commit is contained in:
Charlie Kolb
2025-09-01 14:16:22 +02:00
committed by GitHub
parent b527edb5f8
commit ec7eddc364
5 changed files with 32 additions and 29 deletions

View File

@@ -7,7 +7,7 @@ import type {
INodeProperties,
} from 'n8n-workflow';
import type { FilterType } from './constants';
import { ALL_CONDITIONS, ANY_CONDITION, type FilterType } from './constants';
import { DATA_TABLE_ID_FIELD } from './fields';
import { buildGetManyFilter, isFieldArray, isMatchType } from './utils';
@@ -22,16 +22,16 @@ export function getSelectFields(
type: 'options',
options: [
{
name: 'Any Filter',
value: 'anyFilter',
name: 'Any Condition',
value: ANY_CONDITION,
},
{
name: 'All Filters',
value: 'allFilters',
name: 'All Conditions',
value: ALL_CONDITIONS,
},
] satisfies Array<{ value: FilterType; name: string }>,
displayOptions,
default: 'anyFilter',
default: ANY_CONDITION,
},
{
displayName: 'Conditions',
@@ -50,11 +50,13 @@ export function getSelectFields(
name: 'conditions',
values: [
{
displayName: 'Field Name or ID',
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Column',
name: 'keyName',
type: 'options',
// eslint-disable-next-line n8n-nodes-base/node-param-description-wrong-for-dynamic-options
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
'Choose from the list, or specify using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
typeOptions: {
loadOptionsDependsOn: [DATA_TABLE_ID_FIELD],
loadOptionsMethod: 'getDataTableColumns',
@@ -74,7 +76,7 @@ export function getSelectFields(
default: 'eq',
},
{
displayName: 'Field Value',
displayName: 'Value',
name: 'keyValue',
type: 'string',
default: '',
@@ -94,7 +96,7 @@ export function getSelectFields(
export function getSelectFilter(ctx: IExecuteFunctions, index: number) {
const fields = ctx.getNodeParameter('filters.conditions', index, []);
const matchType = ctx.getNodeParameter('matchType', index, 'anyFilter');
const matchType = ctx.getNodeParameter('matchType', index, ANY_CONDITION);
const node = ctx.getNode();
if (!isMatchType(matchType)) {