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

tree组件 开启搜索 搜索不到字节点继续搜索 js会报错 导致程序都无法运行 即使删除搜索词也无法恢复树菜单 #7549

Open
1 task
Brolly0204 opened this issue May 2, 2024 · 1 comment
Labels

Comments

@Brolly0204
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.20

Environment

vue 3.3.x

Reproduction link

https://3x.antdv.com/components/tree-cn

Steps to reproduce

tree组件中进行搜索

What is expected?

即使搜索不到 继续输入 也不应该报错 不会导致应用无法运行, 程序也能继续运行

What is actually happening?

导致程序都无法运行 即使删除搜索词也无法恢复树菜单,更新vue到3.4.x不会报错,但是vue3.4.x中 ant desing vue modal组件会有无法关闭bug
image

image

删除搜索词后 也无法恢复
image

treeUtil.js:322 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'parent')
at getTreeNodeProps (treeUtil.js:322:1)
at ReactiveEffect.eval [as fn] (TreeNode.js:49:1)
at ReactiveEffect.run (reactivity.esm-bundler.js:178:1)
at get value (reactivity.esm-bundler.js:1140:1)
at eval (TreeNode.js:62:1)
at Object.flush (eagerComputed.js:5:1)

这一行代码报错 parent: entity.parent,

var treeNodeProps = {
eventKey: key,
expanded: expandedKeysSet.has(key),
selected: selectedKeysSet.has(key),
loaded: loadedKeysSet.has(key),
loading: loadingKeysSet.has(key),
checked: checkedKeysSet.has(key),
halfChecked: halfCheckedKeysSet.has(key),
pos: String(entity ? entity.pos : ''),
parent: entity.parent, // 报错

TypeError: Cannot read properties of undefined (reading 'parent')

@selicens selicens assigned selicens and unassigned selicens May 3, 2024
@selicens selicens added the 3.x label May 3, 2024
@shiwanjun1995
Copy link
Contributor

I have the same problem,would you fix it as soon as possible?
@selicens

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

No branches or pull requests

3 participants