diff --git a/packages/nc-gui/components/smartsheet/grid/GroupBy.vue b/packages/nc-gui/components/smartsheet/grid/GroupBy.vue index 20c9215702..b76fddb217 100644 --- a/packages/nc-gui/components/smartsheet/grid/GroupBy.vue +++ b/packages/nc-gui/components/smartsheet/grid/GroupBy.vue @@ -72,7 +72,7 @@ const findAndLoadSubGroup = (key: any) => { if (grp.nested) { if (!grp.children?.length) props.loadGroups({}, grp) } else { - if (!grp.rows?.length) props.loadGroupData(grp) + if (!grp.rows?.length || grp.count !== grp.rows?.length) props.loadGroupData(grp) } } } @@ -258,7 +258,9 @@ const shouldRenderCell = (column) =>
-
{{ grp.column.title }}
+
+ {{ grp.column.title }} +
({{ $t('datatype.Count') }}: {{ grp.count }})
diff --git a/packages/nocodb/src/db/conditionV2.ts b/packages/nocodb/src/db/conditionV2.ts index be7e3eb2c1..9ab45c1634 100644 --- a/packages/nocodb/src/db/conditionV2.ts +++ b/packages/nocodb/src/db/conditionV2.ts @@ -1,4 +1,5 @@ import { + FormulaDataTypes, isDateMonthFormat, isNumericCol, RelationTypes, @@ -447,7 +448,16 @@ const parseConditionV2 = async ( ).builder; return parseConditionV2( baseModelSqlv2, - new Filter({ ...filter, value: knex.raw('?', [filter.value]) } as any), + new Filter({ + ...filter, + value: knex.raw('?', [ + // convert value to number if formulaDataType if numeric + formula.getParsedTree()?.dataType === FormulaDataTypes.NUMERIC && + !isNaN(+filter.value) + ? +filter.value + : filter.value ?? null, // in gp_null value is undefined + ]), + } as any), aliasCount, alias, builder,