English 中文(简体)
纸面设计确认式在点点点点点上未关闭,无
原标题:Ant design confirm modal is not closing on click of Yes and No

使用Ant设计的Im,但Modal未按预期在点击时关闭。

function Study(props) {
let data=props.data
   const showConfirm=(e,val,view) =>{ debugger
  confirm({
    title:  Are you sure you want to remove  +val+  from your study list? ,
    icon: <ExclamationCircleOutlined />,
    okText:  Yes ,
    cancelText:  No ,
    onOk:()=>{confirmOk(val,view)},
    onCancel() {
      console.log( Cancel );
    },
  });
}
 return (
    <div>
      {props.deleteOption && <img  class="deleteIcon" src={crossIcon}   onClick={(e)=>showConfirm(e,data.studyName,props.view)}></img>}
   </div>
 )

}

Please some one suggest the solution

问题回答

Modal.method()的使用情况:https://ant. Design/components/ Format#method

All the Modal. 方法将回头看,然后我们可以通过提及方式更新和关闭模式方言。

“entergraph





相关问题
How to use one react app into another react app?

I have two react apps, parent app and child app. and child app have an hash router. I have build the child app using npm run build, It creates build folder. That build folder moved into inside the ...

how to get selected value in Ant Design

I want to print the selected value, and below is my option list: const vesselName = [ { value: 0 , label: ALBIDDA , }, { value: 1 , label: ALRUMEILA , }, { value: 2 ,...

How to add a <br> tag in reactjs between two strings?

I am using react. I want to add a line break <br> between strings No results and Please try another search term. . I have tried No results.<br>Please try another search term. but ...

热门标签