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

[Transfer] tree list开启show path后,如果自己写renderSelectedPanel是没法渲染路径的,item里面不知道路径是什么,建议Item能加一个fullPath,用户可以自己再弄 #2588

Open
shaoerkuai opened this issue Nov 24, 2024 · 0 comments
Labels
feature request Request new feature

Comments

@shaoerkuai
Copy link

shaoerkuai commented Nov 24, 2024

Which Component Need Enhancement 期望新增功能的组件

  • Transfer

What does the proposed API look like 期望支持的API

Item Interface下面增加一个fullPath列表属性,如果不开启show path,可以考虑默认是undefined,或者默认是本级数组
如果开启了,则以数组形式存放路径,
用户自定义渲染时,能拿到这个item的路径,然后自由处理。

Feature Description 功能描述

如下,是我自己完全自定义渲染的场景,虽然开了show path,但是找不到路径,右侧的label默认取的还是原本的label,虽然说还有其他的办法可以获取,但是因为每个row独立渲染都需要拿item对应的路径,性能会很差

image

image

Additional information 补充说明

一些复杂的场景,甚至可能会以title或者小注释字段的形式表示路径,如果直接在tree的props开启show path然后替换每个item的llabel的话,感觉好像也有很多局限性。

@shaoerkuai shaoerkuai added the feature request Request new feature label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request new feature
Projects
None yet
Development

No branches or pull requests

1 participant