From 5b6e8992bcdff1464ce15b116dd0abfdf8d465d7 Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 5 Aug 2022 15:16:04 +0100 Subject: [PATCH] Removed query filtering on dynamic variables in binding drawer --- .../[selectedDatasource]/rest/[query]/index.svelte | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte index 5ccc173318..8ecd88243e 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte @@ -231,13 +231,10 @@ ] // convert dynamic variables list to simple key/val object - const getDynamicVariables = (datasource, queryId) => { + const getDynamicVariables = datasource => { const variablesList = datasource?.config?.dynamicVariables if (variablesList && variablesList.length > 0) { - const filtered = queryId - ? variablesList.filter(variable => variable.queryId === queryId) - : variablesList - return filtered.reduce( + return variablesList.reduce( (acc, next) => ({ ...acc, [next.name]: next.value }), {} ) @@ -367,7 +364,7 @@ if (query && !query.fields.pagination) { query.fields.pagination = {} } - dynamicVariables = getDynamicVariables(datasource, query._id) + dynamicVariables = getDynamicVariables(datasource) prettifyQueryRequestBody( query,