Reactjs 双击React大日历中的事件,打开语义UI React模式

Reactjs 双击React大日历中的事件,打开语义UI React模式,reactjs,typescript,modal-dialog,semantic-ui-react,react-big-calendar,Reactjs,Typescript,Modal Dialog,Semantic Ui React,React Big Calendar,我试图在用户双击React big calendar中的事件时打开语义UI React模式。我的双击事件处理程序是 eventDoubleClick() { this.setState({ open: true }); return <EditEvent />; } eventDoubleClick(){ 这是我的国家({ 开放:是的 }); 返回; } EditEvent是包含模态的类组件。它的代码是 class Ed

我试图在用户双击React big calendar中的事件时打开语义UI React模式。我的双击事件处理程序是

eventDoubleClick() {    
    this.setState({
      open: true
    });    
    return <EditEvent />;
}
eventDoubleClick(){
这是我的国家({
开放:是的
});    
返回;
}
EditEvent是包含模态的类组件。它的代码是

class EditEvent extends React.Component {
 state = { open: false, startDate: moment() };
 show = dimmer => () => this.setState({ dimmer, open: true });
 close = () => this.setState({ open: false });
 open = () => this.setState({ open: true });

 constructor(props) {
   super(props);       
  }
  render() {
   <div>
     ... Semantic UI Modal goes here
   </div>
  }
 }
 export default EditEvent;
class EditEvent扩展了React.Component{
状态={open:false,startDate:moment()};
show=dimmer=>()=>this.setState({dimmer,open:true});
close=()=>this.setState({open:false});
open=()=>this.setState({open:true});
建造师(道具){
超级(道具);
}
render(){
…这里是语义用户界面模式
}
}
导出默认事件;

到目前为止,我还没有找到关于这个问题的任何帮助

我通过将模式移动到具有大型日历实现的组件中来解决这个问题,该组件使用state设置模式的open属性。它就像一个符咒:)