1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 09:29:49 +02:00

fix hover manu example

This commit is contained in:
Ian Storm Taylor
2018-10-10 01:04:35 -07:00
parent f939d168af
commit 9c597cf97f

View File

@@ -172,14 +172,16 @@ class HoveringMenu extends React.Component {
* Render the editor. * Render the editor.
* *
* @param {Object} props * @param {Object} props
* @param {Editor} editor * @param {Function} next
* @return {Element} * @return {Element}
*/ */
renderEditor = (props, editor) => { renderEditor = (props, next) => {
const { editor } = props
const children = next()
return ( return (
<React.Fragment> <React.Fragment>
{props.children} {children}
<HoverMenu innerRef={menu => (this.menu = menu)} editor={editor} /> <HoverMenu innerRef={menu => (this.menu = menu)} editor={editor} />
</React.Fragment> </React.Fragment>
) )