Scala 如何在提交其他模式时显示模式弹出窗口

Scala 如何在提交其他模式时显示模式弹出窗口,scala,reactjs,Scala,Reactjs,我在react中做了一个单一模式的弹出窗口,但我需要在提交第一个模式时显示另一个模式。我需要知道后台是如何与modal一起工作的 val component = ReactComponentB[Props]("AddNewAgent") .initialState(State()) // initial state from TodoStore .backend(new AddNewAgent.Backend(_)) .renderPS(($, P, S) =>

我在react中做了一个单一模式的弹出窗口,但我需要在提交第一个模式时显示另一个模式。我需要知道后台是如何与modal一起工作的

val component = ReactComponentB[Props]("AddNewAgent")
    .initialState(State()) // initial state from TodoStore 
    .backend(new AddNewAgent.Backend(_))
    .renderPS(($, P, S) => { 
       val B = $.backend
       Button(
        Button.Props(
          B.addNewAgentForm(),
          CommonStyle.default,
          Seq(DashBoardCSS.Style.backgroundTransperant)),
          <.img(HeaderCSS.Style.imgLogo, ^.src := "./assets/images/profile.jpg"),
          if(S.showNewAgentForm)
            AddNewAgentForm(AddNewAgentForm.Props(B.addNewAgent))
          else 
            Seq.empty[ReactElement]) 
       })
   .configure(OnUnmount.install)
   .build

val component=ReactComponentB[Props](“AddNewAgent”)
.initialState(State())//来自TodoStore的初始状态
.backend(newaddnewagent.backend(33;))
.renderPS(($,P,S)=>{
val B=$.backend
钮扣(
按钮,道具(
B.addNewAgentForm(),
CommonStyle.default,
Seq(仪表板CSS.Style.backgroundTransperant)),

请提供一些代码和场景组件=ReactComponentB[Props](“AddNewAgent”).initialState(State())//TodoStore.backend的初始状态(new AddNewAgent.backend()).renderPS(($,P,S)=>{val B=$.backend按钮(Button.Props(B.addNewAgentForm(),CommonStyle.default),Seq(仪表板css.Style.backgroundTransportant)),