I have a custom node that is inherited by the HTTP node. There are 4000 APIs in our system. So, we are choosing API and its related parameters that can be query, path, or body.
The type of API property is options. It has the loadOptionsMethod.
The type of parameter property is “fixedCollection”. It has an option as a key-value pair. The source of the key-value pair is also options loading dynamically.
The problem;
In every change of the value of the input that is expression in design mode, the FixedCollection component is re-rendering as many times as there are records that are the data source of API property.
The node description is like below.
{
displayName: 'Api Name or ID',
name: 'apiId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getApiList',
},
default: '',
required: true,
displayOptions: {
show: {
operation: ['get'],
},
},
},
{
displayName: 'Parameters',
name: 'parameters',
placeholder: 'Add Parameters',
description: 'Adds a parameter fields to set also values which have not been predefined',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
displayOptions: {
show: {
operation: ['get'],
},
},
default: {},
options: [
{
name: 'parameterValues',
displayName: 'Parameter',
values: [
{
displayName: 'Parameter Name or ID',
name: 'parameterName',
type: 'options',
typeOptions: {
loadOptionsDependsOn: ['apiId'],
loadOptionsMethod: 'getApiInformation',
},
default: '',
},
{
displayName: 'Parameter Value',
name: 'parameterValue',
type: 'string',
default: '',
description: 'Value of the parameter to set',
},
],
},
],
},
Information on your n8n setup
- n8n version:0.219.1
- Database (default: SQLite):postgres
- Running n8n via docker or npm
- Operating system: macOS or linux