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

Filtering non existing item in p-dropdown [filter=true, group=true] and pressing key down generates error: Dropdown.html:25 ERROR TypeError: Cannot read property '0' of null #10332

Closed
gintskrastins opened this issue Jun 11, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@gintskrastins
Copy link

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-qrz9jq?file=package.json

Current behavior
After filtring non-existing item and pressing the key down occurs error:

  Dropdown.html:25 ERROR TypeError: Cannot read property '0' of null
    at Dropdown.onKeydown (dropdown.ts:861)
    at Object.eval [as handleEvent] (Dropdown.html:26)
    at handleEvent (view.ts:138)
    at callWithDebugContext (services.ts:641)
    at Object.debugHandleEvent [as handleEvent] (services.ts:381)
    at dispatchEvent (util.ts:135)
    at eval (element.ts:208)
    at HTMLInputElement.eval (dom_renderer.ts:66)
    at ZoneDelegate.invokeTask (zone.js:434)
    at Object.onInvokeTask (ng_zone.ts:390)

Expected behavior
Error is not expected

Minimal reproduction of the problem with instructions

image

What is the motivation / use case for changing the behavior?
Error is not expected.

This is identical reproduction scenario to #10325 only reproduced on latest version.

Please tell us about your environment:

  • Angular version: 12.0.1

  • PrimeNG version: 12.0.0-rc.1

  • Browser: [Chrome 91.0.4472.77 | Firefox 89.0 (64-bit)]

@yigitfindikli yigitfindikli added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jun 11, 2021
@yigitfindikli yigitfindikli added this to the 12.0.0-Final milestone Jun 11, 2021
@yigitfindikli yigitfindikli self-assigned this Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants