From 967c557a58c9482ea7a6d4d0cb3e11a4a345fe47 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Thu, 15 Feb 2024 20:21:47 -0600 Subject: [PATCH] CE-798 - fix typing 'o' bug in quick filters; add missing 'start of' in expression toString calls --- src/qqq/components/query/QuickFilter.tsx | 7 ++++++- src/qqq/utils/qqq/FilterUtils.tsx | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/qqq/components/query/QuickFilter.tsx b/src/qqq/components/query/QuickFilter.tsx index 46c7b90..9023f7c 100644 --- a/src/qqq/components/query/QuickFilter.tsx +++ b/src/qqq/components/query/QuickFilter.tsx @@ -480,7 +480,12 @@ export default function QuickFilter({tableMetaData, fullFieldName, fieldMetaData ()} + //////////////////////////////////////////////////////////////////////////////////////////////////// + // ok, so, by default, if you type an 'o' as the first letter in the FilterCriteriaRowValues box, // + // something is causing THIS element to become selected, if the first letter in its label is 'O'. // + // ... work around is to put invisible ‌ entity as first character in label instead... // + //////////////////////////////////////////////////////////////////////////////////////////////////// + renderInput={(params) => (‌Operator} variant="standard" autoComplete="off" type="search" InputProps={{...params.InputProps}} />)} options={operatorOptions} value={operatorSelectedValue as any} inputValue={operatorInputValue} diff --git a/src/qqq/utils/qqq/FilterUtils.tsx b/src/qqq/utils/qqq/FilterUtils.tsx index 88ab5ea..ffdd398 100644 --- a/src/qqq/utils/qqq/FilterUtils.tsx +++ b/src/qqq/utils/qqq/FilterUtils.tsx @@ -64,7 +64,6 @@ class FilterUtils let rs = []; for (let i = 0; i < param.length; i++) { - console.log(param[i]); if (param[i] && param[i].id && param[i].label) { ///////////////////////////////////////////////////////////// @@ -361,7 +360,12 @@ class FilterUtils else if (value.type == "ThisOrLastPeriod") { const expression = new ThisOrLastPeriodExpression(value); - labels.push(expression.toString()); + let startOfPrefix = ""; + if(fieldMetaData.type == QFieldType.DATE_TIME || expression.timeUnit != "DAYS") + { + startOfPrefix = "start of "; + } + labels.push(`${startOfPrefix}${expression.toString()}`); } else if(fieldMetaData.type == QFieldType.BOOLEAN) {