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:table): fix table filter not change after click the checkbox #3058

Closed
wants to merge 3 commits into from
Closed

fix(module:table): fix table filter not change after click the checkbox #3058

wants to merge 3 commits into from

Conversation

gongsiyi123
Copy link

@gongsiyi123 gongsiyi123 commented Mar 10, 2019

…ox issue#3056

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?

Issue Number: #3056

What is the new behavior?

fixed the bug of issue #3056 , now table filter works fine after click the checkbox. the only change is to add < (nzCheckedChange)="checkMultiple(filter)" > to the nz-checkbox of the filter dropdown. Because I
have followed the code and I found the nz-checkbox.nzCheckedChange method doesn't be called after user click the checkbox. In the current code, the checkMultiple(filter) method be called only when click the li item, so I add the nzCheckedChange to nz-checkbox.

在nz-th.component.html的46-50行,li上有(click)="checkMultiple(filter),但里面的label(nz-checkbox)在nzCheckedChange时不会触发checkMultiple(filter)方法。所以用户点击checkbox不会触发filter变化,只有点击整个li时才会触发变化

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@wzhudev wzhudev requested a review from vthinkxie March 10, 2019 16:22
@netlify
Copy link

netlify bot commented Mar 10, 2019

Deploy preview for ng-zorro-master ready!

Built with commit a04bd8e

https://deploy-preview-3058--ng-zorro-master.netlify.com

@codecov
Copy link

codecov bot commented Mar 10, 2019

Codecov Report

Merging #3058 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3058   +/-   ##
=======================================
  Coverage   97.32%   97.32%           
=======================================
  Files         549      549           
  Lines       11490    11490           
  Branches      815      815           
=======================================
  Hits        11183    11183           
  Misses        197      197           
  Partials      110      110

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 b5d70be...a04bd8e. Read the comment docs.

@vthinkxie
Copy link
Member

Hi @gongsiyi123
thanks for your pr!
plz add test

@gongsiyi123
Copy link
Author

Hi @gongsiyi123
thanks for your pr!
plz add test

I add a single test :)

}).createComponent(NzTestDisableThComponent);
}).toThrow();
});
it('should filterChange be called after check the checkbox', () => {
Copy link
Member

Choose a reason for hiding this comment

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

这个测试用例在之前的代码也可以正常通过,不能用于保证该部分代码改动

vthinkxie added a commit that referenced this pull request Mar 11, 2019
@gongsiyi123 gongsiyi123 deleted the fix-table-filter-branch branch March 11, 2019 12:07
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this pull request Apr 9, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
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.

2 participants