Lifecycle bug

UI Components for Angular
Post Reply
HSmile
Posts: 6
Joined: 15 Apr 2016, 09:55

18 Apr 2016, 13:44

(primeng/components/autocomplete.js)
this.panel is defined only at ngAfterViewInit(), but it is also referenced from this.show() method which is called from ngDoCheck().
Since ngDoCheck() is initialized before ngAfterViewInit(), this.panel appears to be undefined at that moment, which produces following error:
angular2.js?1460977886393:23941 TypeError: Cannot read property 'style' of undefined
at AutoComplete.show (autocomplete.ts:272)
at AutoComplete.ngDoCheck (autocomplete.ts:124)
at AbstractChangeDetector.ChangeDetector_CompanyForm_17.detectChangesInRecordsInternal (viewFactory_CompanyForm:7918)
at AbstractChangeDetector.detectChangesInRecords (angular2.js?1460977886393:9609)
at AbstractChangeDetector.runDetectChanges (angular2.js?1460977886393:9592)
at AbstractChangeDetector._detectChangesContentChildren (angular2.js?1460977886393:9665)
at AbstractChangeDetector.runDetectChanges (angular2.js?1460977886393:9593)
at AbstractChangeDetector._detectChangesContentChildren (angular2.js?1460977886393:9665)
at AbstractChangeDetector.runDetectChanges (angular2.js?1460977886393:9593)
at AbstractChangeDetector._detectChangesInViewChildren (angular2.js?1460977886393:9671)


Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests