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:select): option item not selected with falsy value #5264

Merged
merged 1 commit into from May 13, 2020

Conversation

diyews
Copy link
Contributor

@diyews diyews commented May 13, 2020

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?

nz-select selected falsy value (eg.0) doesn't have the selected class
https://stackblitz.com/edit/angular-8iudzt

Issue Number: N/A

What is the new behavior?

Selected falsy value should have the selected class

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@zorro-bot
Copy link

zorro-bot bot commented May 13, 2020

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented May 13, 2020

Codecov Report

Merging #5264 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5264      +/-   ##
==========================================
- Coverage   91.32%   91.31%   -0.02%     
==========================================
  Files         551      551              
  Lines       13908    13908              
  Branches     2099     2099              
==========================================
- Hits        12702    12700       -2     
- Misses        713      717       +4     
+ Partials      493      491       -2     
Impacted Files Coverage Δ
components/select/option-item.component.ts 92.85% <100.00%> (ø)
components/table/src/table/tbody.component.ts 85.71% <0.00%> (-14.29%) ⬇️
components/table/src/table/tr-measure.component.ts 86.95% <0.00%> (-13.05%) ⬇️
components/time-picker/time-holder.ts 95.78% <0.00%> (+1.05%) ⬆️
components/core/util/text-measure.ts 91.30% <0.00%> (+1.73%) ⬆️

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 6c57866...73bb8cc. Read the comment docs.

@wenqi73
Copy link
Member

wenqi73 commented May 13, 2020

@diyews Seems right to me, you should also add a unit test.

Copy link
Member

@vthinkxie vthinkxie left a comment

Choose a reason for hiding this comment

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

lgtm

@wenqi73 wenqi73 merged commit 1c4d7d8 into NG-ZORRO:master May 13, 2020
@wenqi73
Copy link
Member

wenqi73 commented May 13, 2020

@diyews Thanks!

@diyews
Copy link
Contributor Author

diyews commented May 13, 2020

@wenqi73 I can provide an unit test commit if need.

@wenqi73
Copy link
Member

wenqi73 commented May 13, 2020

@diyews That will be great!

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants