From 2997fd9cfb49ca57c0df3d35b3638ee7fd2dd9c9 Mon Sep 17 00:00:00 2001 From: SagarRajput-7 Date: Thu, 26 Jun 2025 12:55:42 +0530 Subject: [PATCH] fix: removed hadrcoded values suggestion for Having Filter --- .../QueryAddOns/HavingFilter/HavingFilter.tsx | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/QueryAddOns/HavingFilter/HavingFilter.tsx b/frontend/src/components/QueryBuilderV2/QueryV2/QueryAddOns/HavingFilter/HavingFilter.tsx index 1704e041f58f..72fed3077126 100644 --- a/frontend/src/components/QueryBuilderV2/QueryV2/QueryAddOns/HavingFilter/HavingFilter.tsx +++ b/frontend/src/components/QueryBuilderV2/QueryV2/QueryAddOns/HavingFilter/HavingFilter.tsx @@ -53,17 +53,6 @@ const havingOperators = [ }, ]; -// Add common value suggestions -const commonValues = [ - { label: '0', value: '0 ' }, - { label: '1', value: '1 ' }, - { label: '5', value: '5 ' }, - { label: '10', value: '10 ' }, - { label: '50', value: '50 ' }, - { label: '100', value: '100 ' }, - { label: '1000', value: '1000 ' }, -]; - const conjunctions = [ { label: 'AND', value: 'AND ' }, { label: 'OR', value: 'OR ' }, @@ -250,22 +239,9 @@ function HavingFilter({ }; } - // Show value suggestions after operator + // Close dropdown after operator to allow custom value entry if (isAfterOperator(tokens)) { - return { - from: context.pos, - options: [ - ...commonValues.map((value) => ({ - ...value, - apply: applyValueCompletion, - })), - { - label: 'Enter a custom number value', - type: 'text', - apply: applyValueCompletion, - }, - ], - }; + return null; } // Suggest key/operator pairs and ( for grouping