-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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: 🐛 duplicated icons when Tree showLine is true #20102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
Deploy preview for ant-design ready! Built with commit b61a108 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ccf13db950ac743530a61db1d74f8cd7eaca7f44:
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b61a108:
|
Codecov Report
@@ Coverage Diff @@
## master #20102 +/- ##
==========================================
+ Coverage 97.81% 97.81% +<.01%
==========================================
Files 286 286
Lines 7737 7739 +2
Branches 2128 2177 +49
==========================================
+ Hits 7568 7570 +2
Misses 169 169
Continue to review full report at Codecov.
|
@@ -239,6 +239,9 @@ export default class Tree extends React.Component<TreeProps, any> { | |||
<RcTree | |||
ref={this.setTreeRef} | |||
{...props} | |||
// Hide icon in node when showLine is true, show icon in line always | |||
// https://github.com/ant-design/ant-design/issues/20090 | |||
showIcon={showLine ? false : showIcon} | |||
prefixCls={prefixCls} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
showLine ? false : showIcon
=== false
🤔 This is a ...
🔗 Related issue link
close #20090
💡 Background and solution
fixed to
📝 Changelog
showLine
为true
时展示多余图标的问题。☑️ Self Check before Merge