From 37945fc998cd1e2818756a7877ffb4613be46094 Mon Sep 17 00:00:00 2001 From: Darien Kindlund Date: Sat, 27 Jan 2024 21:25:43 -0800 Subject: [PATCH] The loadAll() function should ignore any maxRecords specified, because the intention is the load *all* of the records. Also, marking both the Return All and Limit params as optional, so as to not confuse the user. Making them both required adds a lot of confusion that doesn't make sense. Ideally, the user either specifies Return All OR specifies the Limit value but not BOTH. It seems there's no way to define "conditional requirements" in Flowise params, so it's better to make both params optional. --- packages/components/nodes/documentloaders/Airtable/Airtable.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/components/nodes/documentloaders/Airtable/Airtable.ts b/packages/components/nodes/documentloaders/Airtable/Airtable.ts index 90a7ba03..8845bbe0 100644 --- a/packages/components/nodes/documentloaders/Airtable/Airtable.ts +++ b/packages/components/nodes/documentloaders/Airtable/Airtable.ts @@ -78,6 +78,7 @@ class Airtable_DocumentLoaders implements INode { label: 'Return All', name: 'returnAll', type: 'boolean', + optional: true, default: true, additionalParams: true, description: 'If all results should be returned or only up to a given limit' @@ -86,6 +87,7 @@ class Airtable_DocumentLoaders implements INode { label: 'Limit', name: 'limit', type: 'number', + optional: true, default: 100, additionalParams: true, description: 'Number of results to return' @@ -282,7 +284,6 @@ class AirtableLoader extends BaseDocumentLoader { private async loadAll(): Promise { let data: AirtableLoaderRequest = { - maxRecords: this.limit, view: this.viewId }