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(Menu): remove unexpected re-render, which causes flash and shake when collapsed #15625

Merged
merged 3 commits into from Mar 25, 2019
Merged

fix(Menu): remove unexpected re-render, which causes flash and shake when collapsed #15625

merged 3 commits into from Mar 25, 2019

Conversation

@orzyyyy
Copy link
Contributor

@orzyyyy orzyyyy commented Mar 25, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

👻 What's the background?

  1. Describe the source of requirement, like related issue link.

    To close #15614

  2. Describe the problem and the scenario.

💡 Solution

  1. How to fix the problem, and list final API implementation and usage sample if that is an new feature.

  2. GIF or snapshot should be provided if includes UI/interactive modification.

📝 Changelog description

Describe changes from userside, and list all potential break changes or other risks.

  1. English description

    Fix Menu unexpected shaking when collapsed.

  2. Chinese description (optional)

    修复 Menu 收缩的异常闪动。

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed
@netlify
Copy link

@netlify netlify bot commented Mar 25, 2019

Deploy preview for ant-design ready!

Built with commit 5362d57

https://deploy-preview-15625--ant-design.netlify.com

@codecov
Copy link

@codecov codecov bot commented Mar 25, 2019

Codecov Report

Merging #15625 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15625      +/-   ##
==========================================
- Coverage   94.44%   94.44%   -0.01%     
==========================================
  Files         250      250              
  Lines        6646     6645       -1     
  Branches     1909     1941      +32     
==========================================
- Hits         6277     6276       -1     
  Misses        368      368              
  Partials        1        1
Impacted Files Coverage Δ
components/menu/index.tsx 91.58% <100%> (+0.16%) ⬆️
components/menu/MenuItem.tsx 77.77% <100%> (-5.56%) ⬇️

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 3dc0316...5362d57. Read the comment docs.

@orzyyyy orzyyyy marked this pull request as ready for review Mar 25, 2019
@afc163 afc163 merged commit 788292c into ant-design:master Mar 25, 2019
29 checks passed
@orzyyyy orzyyyy deleted the issue-15614 branch Mar 25, 2019

return (
<Tooltip
title={titleNode}
placement="right"
overlayClassName={`${rootPrefixCls}-inline-collapsed-tooltip`}
>
<Item {...rest} title={inlineCollapsed ? null : title} ref={this.saveMenuItem} />
<Item {...rest} title={title} ref={this.saveMenuItem} />
Copy link
Member

@afc163 afc163 Mar 27, 2019

image

这里造成了非 inlineCollapsed 情况下显示了多余的 Tooltip 问题。

@zy410419243

Copy link
Contributor Author

@orzyyyy orzyyyy Mar 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants