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

[Bug Report] [Component] [tree-select] el-tree-select字典数据延迟[异步]加载,控件label显示异常 #7917

Closed
lwzh200907 opened this issue May 27, 2022 · 4 comments

Comments

@lwzh200907
Copy link

Bug Type: Component

Environment

  • Vue Version: 3.2.26
  • Element Plus Version: 2.1.10
  • Browser / OS: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36 Edg/100.0.1185.44
  • Build Tool: Vite

Reproduction

Related Component

  • el-tree-select

Reproduction Link

Element Plus Playground

Steps to reproduce

  1. 点击【加载数据】按钮,模拟表单load数据,此时为了反显,模拟字典数据为{value,label}
  2. 点击【清空数据】按钮,表单值清空
  3. 点击【修改数据】按钮,模拟点击控件,此时需要加载完整字典
  4. 点击【清空数据】按钮,表单值清空
  5. 再次点击【加载数据】按钮,修改表单值,但此时因已加载完整字典,无需再次加载字典
  6. 此时el-tree-select控件显示值出现问题,未正确反显,但下拉树中已选择正常

What is Expected?

延迟加载data字典数据后,修改控件值,label能正常显示
注意:如果表单值对应的字典条目为下拉树第一级节点,label显示正常

What is actually happening?

延迟加载data字典后,修改控件值,label未能正确反显

Additional comments

为了实现字典延迟【异步】加载相关功能,需要如上定制,请确认此为使用方式不正确,还是控件本身存在bug。
辛苦

image

@yujinpan
Copy link
Member

请尝试将 render-after-expand 打开,或者设置 default-expanded-keys 包含当前值。

@lwzh200907
Copy link
Author

以上两种方案经过测试,都未解决,还请再给确认处理下

@yujinpan
Copy link
Member

yujinpan commented Jun 2, 2022

确实有此问题,请等待后续修复。

@yujinpan
Copy link
Member

yujinpan commented Jun 2, 2022

And some other issues in this playground:

  • checkbox style error in form component
  • checkbox can not select with not leaf node

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

2 participants