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
feat(Tree): add renderChildNodes prop #1273
Conversation
Codecov Report
@@ Coverage Diff @@
## feat/1.19.0 #1273 +/- ##
===============================================
+ Coverage 90.95% 90.96% +<.01%
===============================================
Files 260 260
Lines 14346 14348 +2
Branches 4577 4576 -1
===============================================
+ Hits 13049 13051 +2
Misses 1275 1275
Partials 22 22
Continue to review full report at Codecov.
|
bcc39f4
to
f71cb1a
Compare
docs/tree/demo/render-child-nodes.md
Outdated
@@ -0,0 +1,79 @@ | |||
# 平铺叶子节点 | |||
|
|||
- order: 2 |
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.
order决定了当前demo在最终demo页面上的顺序,不要有重复,已经有order2了
docs/tree/demo/render-child-nodes.md
Outdated
:::lang=en-us | ||
# Tile leaf nodes | ||
|
||
- order: 2 |
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.
同上
docs/tree/demo/render-child-nodes.md
Outdated
render() { | ||
return <Tree checkable renderChildNodes={(nodes) => { | ||
if (nodes.filter((node) => !node.props.children || node.props.children.length === 0).length !== nodes.length) { | ||
return null; |
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.
renderChildNodes 返回null 表示按照原状态渲染有点奇怪,看下是改实现还是改api名字
docs/tree/demo/render-child-nodes.md
Outdated
if (nodes.filter((node) => !node.props.children || node.props.children.length === 0).length !== nodes.length) { | ||
return null; | ||
} | ||
return <ul className="next-tree-child-tree custom-leaf-tree">{nodes}</ul> |
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.
No description provided.