Fixes: Error loading new document in Editor
This commit is contained in:
@@ -9,6 +9,7 @@ type Props = {
|
|||||||
bodyPlaceholder?: string,
|
bodyPlaceholder?: string,
|
||||||
defaultValue?: string,
|
defaultValue?: string,
|
||||||
readOnly?: boolean,
|
readOnly?: boolean,
|
||||||
|
forwardedRef: *,
|
||||||
history: *,
|
history: *,
|
||||||
ui: *,
|
ui: *,
|
||||||
};
|
};
|
||||||
@@ -53,6 +54,7 @@ class Editor extends React.Component<Props> {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<RichMarkdownEditor
|
<RichMarkdownEditor
|
||||||
|
ref={this.props.forwardedRef}
|
||||||
uploadImage={this.onUploadImage}
|
uploadImage={this.onUploadImage}
|
||||||
onClickLink={this.onClickLink}
|
onClickLink={this.onClickLink}
|
||||||
onShowToast={this.onShowToast}
|
onShowToast={this.onShowToast}
|
||||||
@@ -62,4 +64,7 @@ class Editor extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Editor;
|
// $FlowIssue - https://github.com/facebook/flow/issues/6103
|
||||||
|
export default React.forwardRef((props, ref) => (
|
||||||
|
<Editor {...props} forwardedRef={ref} />
|
||||||
|
));
|
||||||
|
|||||||
Reference in New Issue
Block a user