Skip to content

Commit 170935a

Browse files
committed
fix(editor): focussed field in event update
1 parent d6eb96c commit 170935a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

packages/core/src/_internals.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export type {
2727
EditorContextType,
2828
InternalComponentDefinition,
2929
InternalRenderableComponentDefinition,
30-
EditorActions,
3130
} from "./compiler/types";
3231
export {
3332
EasyblocksMetadataProvider,

packages/core/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ComponentType, ReactElement } from "react";
22
import { PartialDeep } from "type-fest";
33
import { Locale } from "./locales";
4-
import { InternalComponentDefinitions } from "./_internals";
4+
import { InternalComponentDefinitions } from "./compiler/types";
55

66
export type ScalarOrCollection<T> = T | Array<T>;
77

packages/editor/src/Editor.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,8 @@ const EditorContent = ({
915915
}
916916

917917
if (event.data.type === "@easyblocks-editor/paste-items") {
918+
console.log(focussedField);
919+
918920
actions.pasteItems(event.data.payload.configs);
919921
}
920922

@@ -1059,7 +1061,7 @@ const EditorContent = ({
10591061
window.addEventListener("message", handleEditorEvents);
10601062

10611063
return () => window.removeEventListener("message", handleEditorEvents);
1062-
}, []);
1064+
}, [focussedField]);
10631065

10641066
const shopstoryCanvasIframe = useRef<HTMLIFrameElement | null>(null);
10651067

0 commit comments

Comments
 (0)