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

inputree defer的节点 特定模式 value不正确 #11646

Open
cybexr opened this issue Feb 21, 2025 · 1 comment
Open

inputree defer的节点 特定模式 value不正确 #11646

cybexr opened this issue Feb 21, 2025 · 1 comment

Comments

@cybexr
Copy link

cybexr commented Feb 21, 2025

对于任意的 tree node,如果 multiple=false joinValues=false extractValue=false 期望 value 是个对象,且分别是 label value的str 如官网文档

----------------------------------------------
multiple  joinValues  extractValue  value
----------------------------------------------
false       false        false      {label: 'A/B/C', value: 'a/b/c'}

但是如果一个node 是defer的,且选中它,value会是 它的json定义,如下面
{"label":"这下面是懒加载的"
"value":"4"
"defer":true
"loading":false
"loaded":true
...}

Image

选中这个defer节点的子节点 是预期的value

"tree":{
"label":"这下面是懒加载的/lazy-option-1"
"value":"4/lazy-1"
"defer":true
}

@cybexr
Copy link
Author

cybexr commented Feb 21, 2025

又跟踪了一下 问题更多了,我的 tree 是 source 动态获取的,结果选择任意一个node ,得到的value 都是 json定义,而非期望的 {label: 'A/B/C', value: 'a/b/c'}

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

1 participant