首页 > 解决方案 > 通过双击反应大日历中的事件打开语义 UI 反应模式

问题描述

当用户双击反应大日历中的事件时,我正在尝试打开语义 UI 反应模式。我的双击事件处理程序是

eventDoubleClick() {    
    this.setState({
      open: true
    });    
    return <EditEvent />;
}

EditEvent是包含 Modal 的类组件。它的代码是

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;

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

标签: reactjstypescriptmodal-dialogsemantic-ui-reactreact-big-calendar

解决方案


我通过在具有大日历实现并使用状态设置模态的打开属性的组件内移动模态来解决了这个问题。它就像一个魅力:)


推荐阅读