diff --git a/.changeset/curvy-dancers-shout.md b/.changeset/curvy-dancers-shout.md new file mode 100644 index 0000000000..e332ae29f6 --- /dev/null +++ b/.changeset/curvy-dancers-shout.md @@ -0,0 +1,3 @@ +--- +'@finos/legend-query-builder': patch +--- diff --git a/packages/legend-query-builder/src/components/filter/QueryBuilderFilterPanel.tsx b/packages/legend-query-builder/src/components/filter/QueryBuilderFilterPanel.tsx index 22d77cb037..832df1f66f 100644 --- a/packages/legend-query-builder/src/components/filter/QueryBuilderFilterPanel.tsx +++ b/packages/legend-query-builder/src/components/filter/QueryBuilderFilterPanel.tsx @@ -363,22 +363,15 @@ export const buildPropertyExpressionFromExistsNode = ( node: QueryBuilderFilterTreeConditionNodeData, ): AbstractPropertyExpression => { let nodeParent = filterState.getParentNode(node); - let existsLambdaParameterNames: string[] = []; let existsLambdaExpressions: AbstractPropertyExpression[] = []; existsLambdaExpressions.push( node.condition.propertyExpressionState.propertyExpression, ); - existsLambdaParameterNames.push( - nodeParent?.lambdaParameterName ?? filterState.lambdaParameterName, - ); while (nodeParent && nodeParent.id !== existsNode.id) { if (nodeParent instanceof QueryBuilderFilterTreeExistsNodeData) { existsLambdaExpressions.push( nodeParent.propertyExpressionState.propertyExpression, ); - existsLambdaParameterNames.push( - nodeParent.lambdaParameterName ?? filterState.lambdaParameterName, - ); } nodeParent = filterState.getParentNode(nodeParent); } @@ -386,17 +379,12 @@ export const buildPropertyExpressionFromExistsNode = ( existsLambdaExpressions.push( existsNode.propertyExpressionState.propertyExpression, ); - existsLambdaParameterNames.push( - existsNode.lambdaParameterName ?? filterState.lambdaParameterName, - ); } - existsLambdaParameterNames = existsLambdaParameterNames.reverse(); existsLambdaExpressions = existsLambdaExpressions.reverse(); const initialPropertyExpression = guaranteeNonNullable( existsLambdaExpressions[0], ); - existsLambdaParameterNames = existsLambdaParameterNames.slice(1); existsLambdaExpressions = existsLambdaExpressions.slice(1); let flattenedPropertyExpressionChain = new AbstractPropertyExpression('');