diff --git a/packages/nc-gui/assets/style/style.css b/packages/nc-gui/assets/style/style.css index b3fa43aa70..af509198d2 100644 --- a/packages/nc-gui/assets/style/style.css +++ b/packages/nc-gui/assets/style/style.css @@ -365,7 +365,7 @@ html { /* sorting and filter */ -.menu-filter-dropdown { +.menu-filter-dropdown:not(.nested) { max-height: 500px; overflow-y: auto; -} \ No newline at end of file +} diff --git a/packages/nc-gui/components/project/spreadsheet/components/ColumnFilter.vue b/packages/nc-gui/components/project/spreadsheet/components/ColumnFilter.vue index 176c91d3d4..f756981188 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/ColumnFilter.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/ColumnFilter.vue @@ -1,37 +1,47 @@ @@ -407,6 +417,7 @@ export default { parentId: this.parentId, is_group: true, status: 'update', + logical_op: 'and', }); this.filters = this.filters.slice(); const index = this.filters.length - 1; @@ -474,4 +485,8 @@ export default { column-gap: 6px; row-gap: 6px; } + +.nc-filter-value-select { + min-width: 100px; +} diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts index ddb0d466c2..9a3e20deba 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts @@ -261,16 +261,17 @@ const parseConditionV2 = async ( filter.comparison_op === 'notempty' ) filter.value = ''; - let field = sanitize( + const _field = sanitize( customWhereClause ? filter.value : alias ? `${alias}.${column.column_name}` : column.column_name ); - let val = customWhereClause ? customWhereClause : filter.value; + const _val = customWhereClause ? customWhereClause : filter.value; return (qb) => { + let [field, val] = [_field, _val]; switch (filter.comparison_op) { case 'eq': qb = qb.where(field, val); diff --git a/packages/nocodb/src/lib/models/Filter.ts b/packages/nocodb/src/lib/models/Filter.ts index bea62d444c..23a8d17eca 100644 --- a/packages/nocodb/src/lib/models/Filter.ts +++ b/packages/nocodb/src/lib/models/Filter.ts @@ -421,7 +421,7 @@ export default class Filter { }); await NocoCache.setList(CacheScope.FILTER_EXP, [viewId], filterObjs); } - return filterObjs?.map((f) => new Filter(f)); + return filterObjs?.filter(f => !f.fk_parent_id)?.map((f) => new Filter(f)); } static async rootFilterListByHook(