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

建议取消树形控件isLeaf设置 #3561

Closed
keyiis opened this issue Jun 12, 2019 · 7 comments
Closed

建议取消树形控件isLeaf设置 #3561

keyiis opened this issue Jun 12, 2019 · 7 comments
Assignees

Comments

@keyiis
Copy link

keyiis commented Jun 12, 2019

What problem does this feature solve?

是否是叶子节点完全可以通过判断是否由children来做到,没必要让开发者显示指定。“叶子节点不可被拖拽模式放置”这个属性建议命名为"canDrop",而不是使用isLeaf,否则容易混淆概念。很多情况下叶子节点是可以被拖拽模式放置的。

What does the proposed API look like?

isLeaf改为canDrop,默认为true

@ng-zorro-bot
Copy link
Collaborator

Translation of this issue:


It is recommended to cancel the tree control isLeaf settings

What problem does this feature solve?

Whether the leaf node can be completely determined by the child or not, there is no need for the developer to display the designation. "Foliage nodes can't be placed in drag and drop mode" This property is recommended to be named "canDrop" instead of isLeaf, otherwise it is easy to confuse the concept. In many cases leaf nodes can be placed in drag and drop mode.

What does the proposed API look like?

isLeaf changed to canDrop, the default is true

@zomixi
Copy link

zomixi commented Jun 13, 2019

image
异步数据时需要指定isLeaf,不然无法结束

@simplejason
Copy link
Member

image
异步数据时需要指定isLeaf,不然无法结束

无法结束情况请添加复现链接,以快速定位问题

@zomixi
Copy link

zomixi commented Jun 14, 2019

image
异步数据时需要指定isLeaf,不然无法结束

无法结束情况请添加复现链接,以快速定位问题

screenshot
I mean this.
https://ng.ant.design/components/tree/zh

@Cyclone77
Copy link

不能取消,因为无法控制异步加载的节点是否有下层

@wzhudev
Copy link
Member

wzhudev commented Sep 23, 2019

如以上同学所说,去掉这个 API 没法知道异步加载之后是否会有子节点。

@wzhudev wzhudev closed this as completed Sep 23, 2019
@dapen7
Copy link

dapen7 commented Jun 17, 2020

解决了么就close

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

No branches or pull requests

7 participants