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): ensure `customRender` is set correctly when initializing cell (#5407)

白熱4099c91d58d6
diff --git a/packages/sheets-ui/src/facade/f-sheet-hooks.ts b/packages/sheets-ui/src/facade/f-sheet-hooks.ts
index e9e025df77..b18810f81a 100644
--- a/packages/sheets-ui/src/facade/f-sheet-hooks.ts
+++ b/packages/sheets-ui/src/facade/f-sheet-hooks.ts
@@ -146,7 +146,10 @@ export class FSheetHooksUIMixin extends FSheetHooks implements IFSheetHooksUIMix
return next(cell);
}
- cell.customRender = [...(cell.customRender || []), ...(customRender || [])];
+ if (!cell.customRender && customRender) {
+ cell.customRender = [...customRender];
+ }
+
return next(cell);
},
priority,