通过双击 React 大日历中的事件打开 Semantic UI React Modal
Open Semantic UI React Modal by double clicking an event in react big calendar
我正在尝试在用户双击反应大日历中的事件时打开语义 UI 反应模式。我的双击事件处理程序是
eventDoubleClick() {
this.setState({
open: true
});
return <EditEvent />;
}
EditEvent是包含Modal的class组件。它的代码是
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;
到目前为止还没有找到关于这个问题的任何帮助
我通过将 Modal 移动到具有大日历实现并使用 state 设置 modal 的 open 属性的组件中解决了这个问题。它就像一个魅力:)
我正在尝试在用户双击反应大日历中的事件时打开语义 UI 反应模式。我的双击事件处理程序是
eventDoubleClick() {
this.setState({
open: true
});
return <EditEvent />;
}
EditEvent是包含Modal的class组件。它的代码是
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;
到目前为止还没有找到关于这个问题的任何帮助
我通过将 Modal 移动到具有大日历实现并使用 state 设置 modal 的 open 属性的组件中解决了这个问题。它就像一个魅力:)