Skip to content
New issue

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

nz-modal when nzOnOk is typeof OnClickCallback<any>, click ok button trigger nzAfterClose twice #3371

Closed
tky753 opened this issue Apr 25, 2019 · 1 comment
Assignees
Labels
Component: Modal 👨‍🏭 Some one working on this A community member has started working on this

Comments

@tky753
Copy link

tky753 commented Apr 25, 2019

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-modal-bug-report000?file=src%2Fapp%2Fapp.component.ts

Steps to reproduce

  1. open console
  2. click show modal button
  3. click 确定 button.
handleOk(): boolean {
  return true;
}

handleCancel(): boolean {
  return undefined;
}
afterClose($event: any){
  console.log('closed for: '   $event);
}

What is expected?

console one line:
closed for: true

What is actually happening?

console two lines:
closed for: true
closed for: undefined

Environment Info
ng-zorro-antd 7.3.3
Browser Chrome 72.0.3626.121(正式版本) (64 位

BTW, when opening the page, afterClose is triggered once immediately.
EmEKZF.png
EmE1i9.png

@hsuanxyz hsuanxyz added the 👨‍🏭 Some one working on this A community member has started working on this label Jan 16, 2020
@hsuanxyz
Copy link
Member

fixed via #4702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Modal 👨‍🏭 Some one working on this A community member has started working on this
Projects
None yet
Development

No branches or pull requests

3 participants