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

[t-tree-select] 使用 TDesign 的 TreeSelect进行多选和异步加载(点击节点才加载数据)时,无法选择节点,只有当其子节点展示完才能选择节点 #3028

Closed
zzyyhh22lx opened this issue Jan 9, 2024 · 2 comments

Comments

@zzyyhh22lx
Copy link

zzyyhh22lx commented Jan 9, 2024

tdesign-vue 版本

最新版本也存在

重现链接

链接

重现步骤

异步加载需要设置children为true,但是如果设置了children为true的话,就无法选中未全部展示的节点

这里一直异步加载children,所以无法选择这个节点,只有当节点全部展示完才可以选中

image

image

期望结果

可以直接选中

实际结果

无法选中未全部展示的节点

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

当遇到异步加载数据时,无法直接选中前面的值,而且拿到的值是一个vue的watch的监听对象__obj__,出现bug

Copy link
Contributor

github-actions bot commented Jan 9, 2024

👋 @zzyyhh22lx,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@maoyiluo
Copy link
Collaborator

需要使用checkStrictly属性,通过treeProps传递

<template>
  <t-tree-select
    :data="options"
    multiple
    v-model="value"
    placeholder="请选择"
    :treeProps="{ load: loadFunc, checkStrictly: true }"
  />
</template>

https://stackblitz.com/edit/jdvepk-5ult6u?file=src%2Fdemo.vue

@uyarn uyarn closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants