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(sheets-ui): fix formula editor's position issue in lower version of React (#2667)
白熱e5020d72c892
diff --git a/packages/ui/src/components/editor/TextEditor.tsx b/packages/ui/src/components/editor/TextEditor.tsxindex 43638f9ec0..30fb92987c 100644--- a/packages/ui/src/components/editor/TextEditor.tsx+++ b/packages/ui/src/components/editor/TextEditor.tsx@@ -171,8 +171,8 @@ export function TextEditor(props: ITextEditorProps & Omit<MyComponentProps, 'onC},editor);- editorService.setValueNoRefresh(props.value || '', id);- placeholderSet(props.placeholder || '');+ editorService.setValueNoRefresh(value || '', id);+ placeholderSet(placeholder || '');const activeChange = debounce((state: boolean) => {setActive(state);diff --git a/packages/ui/src/controllers/ui/ui-desktop.controller.tsx b/packages/ui/src/controllers/ui/ui-desktop.controller.tsxindex 2eb0c41cf1..2d09e86a61 100644--- a/packages/ui/src/controllers/ui/ui-desktop.controller.tsx+++ b/packages/ui/src/controllers/ui/ui-desktop.controller.tsx@@ -68,8 +68,14 @@ export class DesktopUIController extends Disposable {});setTimeout(() => {- const engine = this._renderManagerService.getFirst()?.engine;- engine?.setContainer(canvasElement);+ const allRenders = this._renderManagerService.getRenderAll();++ for (const [key, render] of allRenders) {+ if (isInternalEditorID(key)) continue;++ render.engine.setContainer(canvasElement);+ }+this._lifecycleService.stage = LifecycleStages.Rendered;setTimeout(() => this._lifecycleService.stage = LifecycleStages.Steady, STEADY_TIMEOUT);}, 300);