We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when click ok button in confirm modal: it throw: Uncaught TypeError: Cannot read property 'apply' of undefined, like following image:
Uncaught TypeError: Cannot read property 'apply' of undefined
My code is:
confirm({ title: 'are you sure?', onOk () { // onDeleteItem(record.id) } })
without error throw
http://codepen.io/anon/pen/mWmQJx?editors=001
actually in official documentation is wrong too:
The text was updated successfully, but these errors were encountered:
2.8.2
1b8d5f5
After hours of trying I have found out the issue.
Instead of:
onOk() { }, onCancel() { },
Use:
onOk: () => {}, onCancel: () = {},
This is because these function has to be binded.
Sorry, something went wrong.
楼上正解啊,终于找到出路了! verifiedFile =()=>{ const { location: { query } ,customer} = this.props const { companyId } = query || {} console.log(this.props); Modal.confirm({ title:"开户提示", content:"用户资料不齐全是否开户", onOk:()=>{ this.props.dispatch({ type:"customer/AuditPass", payload:{ companyId:companyId, processStatus:customer.processStatus } }) } }) }
ddcat1115
Successfully merging a pull request may close this issue.
Environment(required)
What did you do? Please provide steps to re-produce your problem.
when click ok button in confirm modal:
it throw:
Uncaught TypeError: Cannot read property 'apply' of undefined
, like following image:My code is:
What do you expected?
without error throw
Re-producible online demo
http://codepen.io/anon/pen/mWmQJx?editors=001
actually in official documentation is wrong too:
The text was updated successfully, but these errors were encountered: