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

fix(module:cascader): add nzClear functionality to cascader #6761

Merged
merged 1 commit into from
Jun 11, 2021
Merged

fix(module:cascader): add nzClear functionality to cascader #6761

merged 1 commit into from
Jun 11, 2021

Conversation

chriso86
Copy link
Contributor

Add the missing nzClear emit to the clearSelection method on the cascader component.
Extend the cascader e2e tests to ensure that the event emitter works as expected.

fix #6751

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] 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?

The nzClear event emitter would not emit when the cascader value was cleared as the implementation was missing.

Issue Number: #6751

What is the new behavior?

When the clearSelection method is executed on the cascader component, the nzClear event emitter will now emit to inform any cascader component consumers.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Used .spyOn and .toHaveBeenCalled to test the event emitter in the e2e spec for the cascader file.
Tests are passing.

Add the missing nzClear emit to the clearSelection method on the cascader component.
Extend the cascader e2e tests to ensure that the event emitter works as expected.

fix #6751
@chriso86 chriso86 requested a review from wzhudev as a code owner June 10, 2021 12:21
@zorro-bot
Copy link

zorro-bot bot commented Jun 10, 2021

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jun 10, 2021

Codecov Report

Merging #6761 (c080f1a) into master (4f915b8) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6761      +/-   ##
==========================================
+ Coverage   89.92%   89.95%   +0.03%     
==========================================
  Files         480      480              
  Lines       15487    15487              
  Branches     2516     2516              
==========================================
+ Hits        13926    13931       +5     
+ Misses        940      936       -4     
+ Partials      621      620       -1     
Impacted Files Coverage Δ
components/cascader/cascader.service.ts 97.56% <ø> (-0.02%) ⬇️
components/cascader/cascader.component.ts 94.67% <100.00%> (+0.01%) ⬆️
components/tabs/tab-nav-bar.component.ts 83.74% <0.00%> (+0.70%) ⬆️
components/table/src/table-data.service.ts 85.24% <0.00%> (+4.91%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f915b8...c080f1a. Read the comment docs.

@chriso86
Copy link
Contributor Author

chriso86 commented Jun 10, 2021

I should have force pushed the last branch but I deleted the remote branch. 😞 So I had to recreate the PR. Sorry about that.

@wzhudev
Copy link
Member

wzhudev commented Jun 10, 2021

I should have force pushed the last branch but I deleted the remote branch. 😞 So I had to recreate the PR. Sorry about that.

Not a problem. Thanks for your contribution~!

Copy link
Member

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

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

LGTM

@chriso86
Copy link
Contributor Author

You're welcome!

@hsuanxyz hsuanxyz merged commit 3dd9534 into NG-ZORRO:master Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nz-cascader nzClear not working or implemented
3 participants