如何在调度程序中使用Material-UI对话框?

时间:2018-10-23 01:01:31

标签: reactjs dialog material-ui scheduler

我很react-big-scheduler正在创建我的应用程序。但是,我遇到了替换我的Material-UI对话框的问题。

newEvent = (...) => {
    if(window.confirm('...'){
    ...
    }

当我将material-ui对话框导出为组件并将代码替换为:

newEvent = (...) => {
    <NewEventDialog />
}

我遇到以下错误:

Expected an assignment or function call and instead saw an expression. 

由于我是新来的反应者,我的问题是:

  • 我打算将window.confirm替换为更具视觉吸引力的窗口,例如material-ui
  • 您如何建议我将其导入到当前的调度程序中?
  • 如何将“提交”布尔值传递给调度程序?

先谢谢您。

1 个答案:

答案 0 :(得分:0)

您必须从newEvent = (...) => { return (<NewEventDialog />) } 组件返回

ALTER TRIGGER [dbo].[student_on_insert]
ON [dbo].[Student]
FOR INSERT 
AS
BEGIN
    SELECT * FROM student

    DECLARE @id INT

    SELECT @id = rollno FROM inserted

    INSERT INTO [dbo].student_adm
    VALUES (@id, 'student having rollno' + CAST(@id AS VARCHAR(4)) + ' was admitted .' + CAST(GETDATE() AS VARCHAR(50))
END