Suggestions and Loading Symbol not loading when created dynamically

UI Components for React
Post Reply
kinjal.thakkar
Posts: 2
Joined: 21 Jul 2023, 14:55

21 Jul 2023, 15:00

Hi,
While trying to create a component dynamically using createComponent API from @angular/core, the suggestions and loading symbol arent loading.

HTML
<p-autoComplete [style]="{'width':'100%'}" [inputStyle]="{'width':'100%'}" [(ngModel)]="selectedAddress" [suggestions]="cSVSuggestionModelOutput.Attributes" (completeMethod)="csvSuggestionHandler($event)" field="{{infos.searchFieldName}}" [minLength]="3" placeholder="{{infos.placeholder}}" (onSelect)="findAddress()" (onKeyUp)="keyPress($event)">
<ng-template let-address pTemplate="item" #itemRender>

<div [innerHTML]="address[infos.searchFieldName] | highlight: selectedAddress"></div>

</ng-template>
</p-autoComplete>

TS
reloadComponent(defaultValue:any){

const someDOMElement = document.querySelector('.host app-address-lookup') as HTMLElement;


this.componentRef = createComponent(AddresslookupComponent,{environmentInjector:this.appRef.injector,hostElement:someDOMElement});

this.appRef.attachView(this.componentRef.hostView);

this.componentRef.changeDetectorRef.detectChanges();

}

kinjal.thakkar
Posts: 2
Joined: 21 Jul 2023, 14:55

01 Aug 2023, 08:44

Hi ! Any one can help in this ?

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

05 Aug 2023, 15:02

Wrong forum this is PrimeReact you want PrimeNG.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests