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:menu): submenu should not remain highlighted #3455

Merged
merged 3 commits into from
May 17, 2019

Conversation

wenqi73
Copy link
Member

@wenqi73 wenqi73 commented May 16, 2019

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: #3434

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@netlify
Copy link

netlify bot commented May 16, 2019

Deploy preview for ng-zorro-master ready!

Built with commit dffbf42

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

@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #3455 into master will decrease coverage by 1.15%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3455      +/-   ##
=========================================
- Coverage   96.66%   95.5%   -1.16%     
=========================================
  Files         609     609              
  Lines       13187   13216      +29     
  Branches     1803    1804       +1     
=========================================
- Hits        12747   12622     -125     
- Misses        199     212      +13     
- Partials      241     382     +141
Impacted Files Coverage Δ
components/menu/nz-submenu.component.ts 100% <100%> (+1.12%) ⬆️
components/core/util/getMentions.ts 50% <0%> (-16.67%) ⬇️
components/core/scroll/nz-scroll.service.ts 66.03% <0%> (-13.21%) ⬇️
components/core/polyfill/request-animation.ts 20% <0%> (-12%) ⬇️
components/slider/nz-slider-step.component.ts 88.88% <0%> (-11.12%) ⬇️
components/i18n/nz-i18n.service.ts 80.95% <0%> (-9.53%) ⬇️
components/core/util/textarea-caret-position.ts 42.1% <0%> (-8.78%) ⬇️
components/breadcrumb/nz-breadcrumb.component.ts 56.52% <0%> (-6.53%) ⬇️
components/slider/nz-slider-marks.component.ts 90.47% <0%> (-4.77%) ⬇️
components/select/nz-option-container.component.ts 95.34% <0%> (-4.66%) ⬇️
... and 58 more

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 b0f353c...dffbf42. Read the comment docs.

@wenqi73 wenqi73 changed the title [WIP]fix(module:menu): submenu should not remain highlighted fix(module:menu): submenu should not remain highlighted May 16, 2019
@@ -200,6 +200,9 @@ export class NzSubMenuComponent implements OnInit, OnDestroy, AfterContentInit,
takeUntil(this.destroy$)
)
.subscribe(selected => {
if (selected === false) {
Copy link
Member

Choose a reason for hiding this comment

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

-        if (selected === false) {
-          this.isMouseHover = selected;
-        }

应该在 this.nzSubmenuService.open$ 改变的时候设置 isMouseHover 的状态.

@hsuanxyz hsuanxyz merged commit fd47605 into NG-ZORRO:master May 17, 2019
@wenqi73 wenqi73 deleted the 3434 branch May 18, 2019 11:29
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this pull request Apr 9, 2020
* fix(module:menu): submenu should not remain highlighted

* fix: add unit test

* fix: set isMouseHover when overlay collapse
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
* fix(module:menu): submenu should not remain highlighted

* fix: add unit test

* fix: set isMouseHover when overlay collapse
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