You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I've developed a typescript wrapper for the component.
I suspect that, because strict mode react invoke effects twice, the initialization process of TuiImageEditor fails.
I've an error on
this._invoker.on(EXECUTE_COMMAND, function (command) {
return _this2.ui.fire(EXECUTE_COMMAND, command);
});
when image is first loaded.
Ui is null.
I suppose that destroy is resetting it.
To Reproduce
`import React, {useEffect, useRef} from "react";
import TuiImageEditor from "tui-image-editor";
import "tui-image-editor/dist/tui-image-editor.css";
import "tui-color-picker/dist/tui-color-picker.css";
Hi ! did you find a reasonable workaround ?
I have to disable StrictMode every time I want to work with image editor, and it's not really satisfying.
See you
Describe the bug
I've developed a typescript wrapper for the component.
I suspect that, because strict mode react invoke effects twice, the initialization process of TuiImageEditor fails.
I've an error on
this._invoker.on(EXECUTE_COMMAND, function (command) {
return _this2.ui.fire(EXECUTE_COMMAND, command);
});
when image is first loaded.
Ui is null.
I suppose that destroy is resetting it.
To Reproduce
`import React, {useEffect, useRef} from "react";
import TuiImageEditor from "tui-image-editor";
import "tui-image-editor/dist/tui-image-editor.css";
import "tui-color-picker/dist/tui-color-picker.css";
import "./imageEditor.scss";
export const ImageEditor = ({imageDataUrl}: { imageDataUrl: string }) => {
const containerRef = useRef(null);
const imageEditorRef = useRef<TuiImageEditor | null>(null);
};`
Expected behavior
I expect initialization to stop on destroyed components.
The text was updated successfully, but these errors were encountered: