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(sheets-ui/facade): fix cell event not triggering when listening through the facade API (#4628)

白熱92398b23b2d1
diff --git a/packages/sheets-ui/src/facade/f-univer.ts b/packages/sheets-ui/src/facade/f-univer.ts
index fd957f8980..38e33336bc 100644
--- a/packages/sheets-ui/src/facade/f-univer.ts
+++ b/packages/sheets-ui/src/facade/f-univer.ts
@@ -291,11 +291,8 @@ export class FUniverSheetsUIMixin extends FUniver implements IFUniverSheetsUIMix
);
}
- /**
- * @ignore
- */
// eslint-disable-next-line max-lines-per-function
- _initObserverListener(injector: Injector): void {
+ private _initObserverListener(injector: Injector): void {
const univerInstanceService = injector.get(IUniverInstanceService);
const unitM = univerInstanceService.getFocusedUnit();
const unitId = unitM?.getUnitId();
@@ -658,10 +655,10 @@ export class FUniverSheetsUIMixin extends FUniver implements IFUniverSheetsUIMix
/**
* @ignore
*/
-
// eslint-disable-next-line max-lines-per-function
override _initialize(injector: Injector): void {
this._initSheetUIEvent(injector);
+ this._initObserverListener(injector);
const commandService = injector.get(ICommandService);
this.registerEventHandler(
this.Event.BeforeClipboardChange,