react-umeditor icon indicating copy to clipboard operation
react-umeditor copied to clipboard

[bug]两个不同页面都使用此组件,来回切换后一直处于正在加载

Open luoyjx opened this issue 8 years ago • 0 comments

在两个不同页面使用此组件,在两个页面间多次来回切换后,组件处于正在加载中

目前解决方案: 在父组件的componentDidMount中设置编辑器的loaded state 为 true

componentDidMount() {
  this.editor.setState({
    loaded: true,
  });
}

// ES6 style
render() {
  <Editor
    ref={(editor) => {this.editor = editor}}
    icons={icons}
    plugins={plugins}
    />
}

luoyjx avatar Apr 12 '17 03:04 luoyjx