Skip to content

Commit 520bf66

Browse files
committed
Remove imperative API from ItemEditor for preview updates
1 parent 19fe692 commit 520bf66

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/perseus-editor/src/item-editor.tsx

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import * as React from "react";
33
import _ from "underscore";
44

55
import DeviceFramer from "./components/device-framer";
6-
import Editor from "./editor";
7-
import IframeContentRenderer from "./iframe-content-renderer";
86
import ContentRenderer from "./content-renderer";
7+
import Editor from "./editor";
98
import ItemExtrasEditor from "./item-extras-editor";
109

1110
import type {
@@ -45,7 +44,6 @@ class ItemEditor extends React.Component<Props> {
4544
answerArea: {},
4645
};
4746

48-
frame = React.createRef<IframeContentRenderer>();
4947
questionEditor = React.createRef<Editor>();
5048
itemExtrasEditor = React.createRef<ItemExtrasEditor>();
5149

@@ -56,10 +54,6 @@ class ItemEditor extends React.Component<Props> {
5654
this.props.onChange(_(props).extend(newProps), cb, silent);
5755
};
5856

59-
triggerPreviewUpdate: (newData?: any) => void = (newData: any) => {
60-
this.frame.current?.sendNewData(newData);
61-
};
62-
6357
handleEditorChange: ChangeHandler = (newProps, cb, silent) => {
6458
const question = _.extend({}, this.props.question, newProps);
6559
this.updateProps({question}, cb, silent);

0 commit comments

Comments
 (0)