Skip to content

selectTree使用treeData,添加showSearch,搜索没有的值,报js错误 #2082

@xuejiaomeng

Description

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

Version

1.5.1

Environment

vue 2.5.17 ,Chrome浏览器, mac

Reproduction link

Edit on CodeSandbox

Steps to reproduce

1.选择一个值
2.再到搜索框中输入 列表中没有的字段
3.点击任意地方,是输入框失去焦点,问题出现了 :
Cannot read property 'domTreeNodes' of null
at VueComponent.eval (https://wvz9o.csb.app/node_modules/ant-design-vue/lib/vc-tree-select/src/Select.js:281:45)
4.Error in nextTick: "TypeError: Cannot read property 'domTreeNodes' of null", 未修复到,搜索没有的值之后,鼠标移开,使该组件失去焦点,再次点击下拉,还是会报上面的错,单选的情况,多选没有该问题

What is expected?

不报错

What is actually happening?

这个问题在1.4.*的版本是没有,1.5.0到1.5.3 都有这个问题

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions