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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix: fix open filter panel will trigger SheetEditEnded event (#5955)
wpxp123456a50385e2ac64
diff --git a/packages/sheets-filter-ui/src/commands/operations/sheets-filter.operation.ts b/packages/sheets-filter-ui/src/commands/operations/sheets-filter.operation.tsindex f7eaf15cca..1d2088d5ce 100644--- a/packages/sheets-filter-ui/src/commands/operations/sheets-filter.operation.ts+++ b/packages/sheets-filter-ui/src/commands/operations/sheets-filter.operation.ts@@ -18,7 +18,7 @@ import type { IOperation } from '@univerjs/core';import type { FilterBy } from '@univerjs/sheets-filter';import { CommandType, ICommandService, IContextService, Quantity } from '@univerjs/core';import { SheetsFilterService } from '@univerjs/sheets-filter';-import { SetCellEditVisibleOperation } from '@univerjs/sheets-ui';+import { IEditorBridgeService, SetCellEditVisibleOperation } from '@univerjs/sheets-ui';import { ILayoutService } from '@univerjs/ui';import { SheetsFilterPanelService } from '../../services/sheets-filter-panel.service';@@ -44,7 +44,10 @@ export const OpenFilterPanelOperation: IOperation<IOpenFilterPanelOperationParamconst commandService = accessor.get(ICommandService);// Close the cell edit if it is opened.- commandService.syncExecuteCommand(SetCellEditVisibleOperation.id, { visible: false });+ const editorBridgeService = accessor.has(IEditorBridgeService) ? accessor.get(IEditorBridgeService) : null;+ if (editorBridgeService?.isVisible().visible) {+ commandService.syncExecuteCommand(SetCellEditVisibleOperation.id, { visible: false });+ }const { unitId, subUnitId, col } = params;const filterModel = sheetsFilterService.getFilterModel(unitId, subUnitId);