[GroupBy] Add views filters to groupBy query 2/2: handle anyFieldFilter (#14791)

Following https://github.com/twentyhq/twenty/pull/14762 

In this PR
- moved logic around any field filter formatting to twenty-shared
- added any field filter to the filters applied to groupBy when viewId
is defined
- added integration test
This commit is contained in:
Marie
2025-09-30 16:13:40 +00:00
committed by GitHub
parent 3927b36406
commit f33396e425
46 changed files with 805 additions and 549 deletions
@@ -0,0 +1,15 @@
import { isNumber } from '@sniptt/guards';
export const isNonEmptyArray = <T>(
probableArray: T[] | readonly T[] | undefined | null,
): probableArray is NonNullable<T[]> => {
if (
Array.isArray(probableArray) &&
isNumber(probableArray.length) &&
probableArray.length > 0
) {
return true;
}
return false;
};