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

cascader throw "ERROR TypeError: Cannot read property 'length' of undefined" #2105

Closed
zd5043039119 opened this issue Sep 5, 2018 · 2 comments · Fixed by #2241
Closed

cascader throw "ERROR TypeError: Cannot read property 'length' of undefined" #2105

zd5043039119 opened this issue Sep 5, 2018 · 2 comments · Fixed by #2241
Assignees
Labels

Comments

@zd5043039119
Copy link
Contributor

zd5043039119 commented Sep 5, 2018

Version

1.4.1

Environment

Angular 6.1.3,Chrome 67.0.3396.87

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-ifgg7s

Steps to reproduce

  1. 触发Cascader,并使焦点聚集在输入框
  2. 输入2,这时搜索结果为Not Found
  3. 点击"Change Options"Button
  4. 重新选中Cascader
  5. 任意选中一个选项

What is expected?

能正常选择结果

What is actually happening?

ERROR TypeError: Cannot read property 'length' of undefined
    at eval (nz-cascader.component.ts:1269)
    at ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (ng_zone.ts:262)
    at ZoneDelegate.invokeTask (zone.js:420)
    at Zone.runTask (zone.js:188)
    at ZoneTask.invokeTask (zone.js:496)
    at ZoneTask.invoke (zone.js:485)
    at timer (zone.js:2054)

Other?

@wzhudev
Copy link
Member

wzhudev commented Sep 5, 2018

@zd5043039119 Please provide a valid reproduction link.

@zd5043039119
Copy link
Contributor Author

@wendzhue Updated

@wzhudev wzhudev self-assigned this Sep 6, 2018
wzhudev pushed a commit to wzhudev/ng-zorro-antd that referenced this issue Oct 1, 2018
wzhudev pushed a commit to wzhudev/ng-zorro-antd that referenced this issue Oct 4, 2018
vthinkxie pushed a commit that referenced this issue Oct 11, 2018
…ode (#2241)

* fix(module:cascader): fix error when nzOptions change and in search mode

close #2105

* make prepareSearchValue private
wzhudev pushed a commit to wzhudev/ng-zorro-antd that referenced this issue Oct 15, 2018
…ode (NG-ZORRO#2241)

* fix(module:cascader): fix error when nzOptions change and in search mode

close NG-ZORRO#2105

* make prepareSearchValue private
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
…ode (NG-ZORRO#2241)

* fix(module:cascader): fix error when nzOptions change and in search mode

close NG-ZORRO#2105

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

Successfully merging a pull request may close this issue.

2 participants