In multiple mode, clicking the dropdown throws the error;
AutoComplete.html:17 ERROR TypeError: Cannot read property 'nativeElement' of undefined
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.
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)
I still get that error in 4.0.RC4 when [dropdown]="true" and [multiple]="true"
RC5 as well, same error? Can you post stack trace?
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.
Thanks, I will check this.
Just checked in primeng 4 Final, working without any problem. Thanks
Most helpful comment
I still get that error in 4.0.RC3 when [dropdown]="true" and [multiple]="true"
ERROR TypeError: Cannot read property 'nativeElement' of undefined (platform-browser.es5.js:2683)
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.
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)