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): fix columns not dropped #3037

Merged
merged 6 commits into from
Mar 21, 2019

Conversation

wzhudev
Copy link
Member

@wzhudev wzhudev commented Mar 6, 2019

close #3027

refactor(module:cascader): refactor cascader

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)
[x] 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: N/A

What is the new behavior?

When you click an option in the second column, the third column would be removed. So the bug in that issue gets resolved.

I also refactored the component for less maintenance cost in the future. Not UI directly related logic was moved to NzCascaderService. Lots of redundant code and logic were removed.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@wzhudev wzhudev marked this pull request as ready for review March 7, 2019 03:09
@netlify
Copy link

netlify bot commented Mar 7, 2019

Deploy preview for ng-zorro-master ready!

Built with commit 5385791

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

@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #3037 into master will increase coverage by 0.02%.
The diff coverage is 99.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3037      +/-   ##
==========================================
+ Coverage    97.3%   97.32%   +0.02%     
==========================================
  Files         550      552       +2     
  Lines       11539    11594      +55     
  Branches      826      826              
==========================================
+ Hits        11228    11284      +56     
+ Misses        201      200       -1     
  Partials      110      110
Impacted Files Coverage Δ
components/cascader/nz-cascader-li.component.ts 94.44% <100%> (+4.97%) ⬆️
components/cascader/nz-cascader-definitions.ts 100% <100%> (ø)
components/cascader/nz-cascader-utils.ts 100% <100%> (ø)
components/cascader/nz-cascader.service.ts 98.87% <98.87%> (ø)
components/cascader/nz-cascader.component.ts 99.63% <99.13%> (+0.38%) ⬆️
components/cascader/types.ts

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 01b3465...5385791. Read the comment docs.

@wzhudev wzhudev requested review from fbchen and vthinkxie March 8, 2019 03:26
@wzhudev

This comment has been minimized.

@wzhudev wzhudev force-pushed the refactor-cascader branch 2 times, most recently from 48c9f96 to 0d863e0 Compare March 13, 2019 12:35
@simplejason simplejason requested review from simplejason and removed request for vthinkxie and fbchen March 21, 2019 03:02
Wendell added 6 commits March 21, 2019 11:36
close NG-ZORRO#3034

fix: multi fixes

fix: fix bugs to pass tests

chore: get test specs back

fix: rollup

fix: try to fix rollup by locking version

test: add aborting searching test

fix: lint

chore: try to adopt prettier

chore: remove @Private
@simplejason simplejason merged commit 72a9e67 into NG-ZORRO:master Mar 21, 2019
@wzhudev wzhudev deleted the refactor-cascader branch March 21, 2019 04:05
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this pull request Apr 9, 2020
* fix(module:cascader): fix columns not dropped

fix: multi fixes

fix: fix bugs to pass tests

chore: get test specs back

fix: rollup

fix: try to fix rollup by locking version

test: add aborting searching test

fix: lint

chore: try to adopt prettier

chore: remove @Private

* fix: fix types in utils

* fix: remove redefined interfaces

* fix: fix cascacder folded when quiting searching mode

* fix: set timer to null

* fix: fix cannot be reset & column not drop for leaf node

close NG-ZORRO#3034
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
* fix(module:cascader): fix columns not dropped

fix: multi fixes

fix: fix bugs to pass tests

chore: get test specs back

fix: rollup

fix: try to fix rollup by locking version

test: add aborting searching test

fix: lint

chore: try to adopt prettier

chore: remove @Private

* fix: fix types in utils

* fix: remove redefined interfaces

* fix: fix cascacder folded when quiting searching mode

* fix: set timer to null

* fix: fix cannot be reset & column not drop for leaf node

close NG-ZORRO#3034
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.

Cascader在同一层级有叶子节点和非叶子节点时可以选择到错误的结果
3 participants