diff --git a/packages/web/src/datagrid/CollectionDataGridCore.svelte b/packages/web/src/datagrid/CollectionDataGridCore.svelte index d5da3b59..a4e72e83 100644 --- a/packages/web/src/datagrid/CollectionDataGridCore.svelte +++ b/packages/web/src/datagrid/CollectionDataGridCore.svelte @@ -21,12 +21,16 @@ function buildGridMongoCondition(props) { const filters = props?.display?.config?.filters; + const filterBehaviour = + props?.display?.driver?.getFilterBehaviour(null, standardFilterBehaviours) ?? mongoFilterBehaviour; + + // console.log('USED FILTER BEHAVIOUR', filterBehaviour); const conditions = []; for (const uniqueName in filters || {}) { if (!filters[uniqueName]) continue; try { - const ast = parseFilter(filters[uniqueName], mongoFilterBehaviour); + const ast = parseFilter(filters[uniqueName], filterBehaviour); // console.log('AST', ast); const cond = _.cloneDeepWith(ast, expr => { if (expr.__placeholder__) { @@ -123,7 +127,7 @@ import ChangeSetGrider from './ChangeSetGrider'; import LoadingDataGridCore from './LoadingDataGridCore.svelte'; - import { mongoFilterBehaviour } from 'dbgate-tools'; + import { mongoFilterBehaviour, standardFilterBehaviours } from 'dbgate-tools'; export let conid; export let display;