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

AutoComplete Dropdown click throws error #2391

Closed
cagataycivici opened this issue Mar 27, 2017 · 6 comments
Closed

AutoComplete Dropdown click throws error #2391

cagataycivici opened this issue Mar 27, 2017 · 6 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@cagataycivici
Copy link
Member

In multiple mode, clicking the dropdown throws the error;

AutoComplete.html:17 ERROR TypeError: Cannot read property 'nativeElement' of undefined
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Mar 27, 2017
@cagataycivici cagataycivici added this to the 4.0.RC2 milestone Mar 27, 2017
@cagataycivici cagataycivici self-assigned this Mar 27, 2017
@rskrib1978
Copy link

rskrib1978 commented Apr 15, 2017

I still get that error in 4.0.RC3 when [dropdown]="true" and [multiple]="true"

ERROR TypeError: Cannot read property 'nativeElement' of undefined
at AutoComplete.handleDropdownClick (autocomplete.js:196)
at Object.eval [as handleEvent] (AutoComplete.html:19)
at handleEvent (core.es5.js:11805)
at callWithDebugContext (core.es5.js:13013)
at Object.debugHandleEvent [as handleEvent] (core.es5.js:12601)
at dispatchEvent (core.es5.js:8780)
at core.es5.js:9370
at HTMLButtonElement. (platform-browser.es5.js:2683)
at ZoneDelegate.webpackJsonp.780.ZoneDelegate.invokeTask (zone.js:398)
at Object.onInvokeTask (core.es5.js:4116)
at ZoneDelegate.webpackJsonp.780.ZoneDelegate.invokeTask (zone.js:397)
at Zone.webpackJsonp.780.Zone.runTask (zone.js:165)
at HTMLButtonElement.ZoneTask.invoke (zone.js:460)

@Prontsevich
Copy link

I still get that error in 4.0.RC4 when [dropdown]="true" and [multiple]="true"

@cagataycivici
Copy link
Member Author

RC5 as well, same error? Can you post stack trace?

@Prontsevich
Copy link

The same in RC5. Problem in handleDropdownClick function.
handleDropdownClick(event) {
this.focusInput();
this.onDropdownClick.emit({
originalEvent: event,
query: this.inputEL.nativeElement.value
});
}

If [multiple]="true" then this.inputEL is undefined. You should use this.multiInputEL as you did in focusInput function.

@cagataycivici
Copy link
Member Author

Thanks, I will check this.

@rskrib1978
Copy link

Just checked in primeng 4 Final, working without any problem. Thanks

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

3 participants