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: 😢 Fix Tree showLine and showIcon missing icon #20196
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 20f0749 |
components/tree/demo/line.md
Outdated
@@ -37,7 +37,7 @@ class Demo extends React.Component { | |||
</TreeNode> | |||
<TreeNode title="parent 1-2" key="0-0-2"> | |||
<TreeNode title="leaf" key="0-0-2-0" /> | |||
<TreeNode icon={<Icon type="form" />} title="leaf" key="0-0-2-1" /> | |||
<TreeNode switcherIcon={<Icon type="form" />} title="leaf" key="0-0-2-1" /> |
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.
不应该用 icon 去设置 switcherIcon:#20090
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 20f0749:
|
Codecov Report
@@ Coverage Diff @@
## master #20196 +/- ##
==========================================
- Coverage 97.81% 97.81% -0.01%
==========================================
Files 286 286
Lines 7739 7735 -4
Branches 2132 2164 +32
==========================================
- Hits 7570 7566 -4
Misses 169 169
Continue to review full report at Codecov.
|
components/tree/demo/line.md
Outdated
@@ -37,7 +37,7 @@ class Demo extends React.Component { | |||
</TreeNode> | |||
<TreeNode title="parent 1-2" key="0-0-2"> | |||
<TreeNode title="leaf" key="0-0-2-0" /> | |||
<TreeNode icon={<Icon type="form" />} title="leaf" key="0-0-2-1" /> | |||
<TreeNode switcherIcon={<Icon type="form" />} title="leaf" key="0-0-2-1" /> |
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.
也保留一个 icon
的例子
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.
97636c3
to
20f0749
Compare
🤔 This is a ...
🔗 Related issue link
close #20192
💡 Background and solution
Caused by #20102
fixed back to
We should use
switcherIcon
instead oficon
to customize icon in TreeshowLine
mode.📝 Changelog
showLine
andshowIcon
missing icon.showLine
和showIcon
同时开启时[+]
[-]
图标丢失的问题。☑️ Self Check before Merge
View rendered components/tree/demo/line.md