primeng icon indicating copy to clipboard operation
primeng copied to clipboard

AutoComplete Dropdown click throws error

Open cagataycivici opened this issue 9 years ago • 6 comments

In multiple mode, clicking the dropdown throws the error;

AutoComplete.html:17 ERROR TypeError: Cannot read property 'nativeElement' of undefined

cagataycivici avatar Mar 27 '17 11:03 cagataycivici

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)

rskrib1978 avatar Apr 15 '17 20:04 rskrib1978

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

Prontsevich avatar Apr 28 '17 13:04 Prontsevich

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

cagataycivici avatar Apr 28 '17 18:04 cagataycivici

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.

Prontsevich avatar Apr 29 '17 07:04 Prontsevich

Thanks, I will check this.

cagataycivici avatar Apr 29 '17 07:04 cagataycivici

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

rskrib1978 avatar May 08 '17 13:05 rskrib1978