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

feat(module:modal): loading state (confirmLoading) of default footer in modal opened by nzModalService #340

Merged
merged 1 commit into from
Sep 23, 2017

Conversation

alche47
Copy link
Contributor

@alche47 alche47 commented Sep 20, 2017

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

#365

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 40.743% when pulling 8ad15d0 on AlcheXie:fix-modal into ae7c757 on NG-ZORRO:master.

@alche47 alche47 changed the title feat(module:modal): show confirm loading status of modal opened by nzModalService feat(module:modal): loading state (confirmLoading) of default footer in modal opened by nzModalService Sep 21, 2017
props[ 'onCancel' ] = this._getConfirmCb(props[ 'nzOnCancel' ]);
// 在service模式下,不需要nzOnOk,防止触发this.nzOnOk.emit(e);
delete props[ 'nzOnOk' ];
delete props[ 'nzOnCancel' ];
return props;
}

_getConfirmCb(fn?: Function): Function {
return (_close) => {
_getConfirmCb(fn?: Function, isShowConfrimLoading: boolean = false): Function {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isShowConfrimLoading-> isShowConfirmLoading

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! What a stupid mistake!

props[ 'onCancel' ] = this._getConfirmCb(props[ 'nzOnCancel' ]);
// 在service模式下,不需要nzOnOk,防止触发this.nzOnOk.emit(e);
delete props[ 'nzOnOk' ];
delete props[ 'nzOnCancel' ];
return props;
}

_getConfirmCb(fn?: Function): Function {
return (_close) => {
_getConfirmCb(fn?: Function, isShowConfrimLoading: boolean = false): Function {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @AlcheXie thanks for your pr.
It would be better submit an issue before pr any new feat, and doc needs updated when new feat added.

Copy link
Contributor Author

@alche47 alche47 Sep 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see. I will update these changes later.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 40.757% when pulling dd5f600 on AlcheXie:fix-modal into 1a997c2 on NG-ZORRO:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 40.757% when pulling dd5f600 on AlcheXie:fix-modal into 1a997c2 on NG-ZORRO:master.

@vthinkxie vthinkxie merged commit 90b7e12 into NG-ZORRO:master Sep 23, 2017
@alche47 alche47 deleted the fix-modal branch September 23, 2017 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants