Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(filter): fix the error of filtering multiple conditions (#6059)

wpxp123456e95e64efdc4b
diff --git a/packages/sheets-filter/src/models/filter-model.ts b/packages/sheets-filter/src/models/filter-model.ts
index 6090abd9d8..0e9f787d43 100644
--- a/packages/sheets-filter/src/models/filter-model.ts
+++ b/packages/sheets-filter/src/models/filter-model.ts
@@ -184,7 +184,10 @@ export class FilterModel extends Disposable {
this._setCriteriaWithoutReCalc(col, criteria);
if (reCalc) {
+ // save some performance if we can reuse the cached filtered out rows.
this._rebuildAlreadyFilteredOutRowsWithCache();
+ // but we still need to recalc the all columns.
+ this._getAllFilterColumns().forEach((filterColumn) => filterColumn.__clearCache());
this._reCalcWithNoCacheColumns();
this._emit();
this._emitHasCriteria();