ng-zorro-antd
ng-zorro-antd copied to clipboard
fix(module:select): allow using arrow buttons on empty list
Prevent the error Cannot read property 'nzValue' of undefined
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md#commit
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
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?
Using arrow button on empty list will throw an error "Cannot read property 'nzValue' of undefined"
Issue Number: N/A
What is the new behavior?
Select component will not throw the error
Does this PR introduce a breaking change?
[ ] Yes
[x] No
Other information
This preview will be available after the AzureCI is passed.
Codecov Report
Merging #6692 (8914f70) into master (f9e7d23) will increase coverage by
0.03%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #6692 +/- ##
==========================================
+ Coverage 89.92% 89.96% +0.03%
==========================================
Files 481 481
Lines 15403 15403
Branches 2492 2494 +2
==========================================
+ Hits 13851 13857 +6
+ Misses 931 929 -2
+ Partials 621 617 -4
Impacted Files | Coverage Δ | |
---|---|---|
components/select/select.component.ts | 87.45% <100.00%> (+0.32%) |
:arrow_up: |
components/tabs/tab-nav-bar.component.ts | 83.09% <0.00%> (+0.70%) |
:arrow_up: |
components/time-picker/time-holder.ts | 95.78% <0.00%> (+1.05%) |
:arrow_up: |
components/core/util/text-measure.ts | 91.30% <0.00%> (+1.73%) |
:arrow_up: |
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 f9e7d23...8914f70. Read the comment docs.
#7018