Auto-Complete and primitive variable

UI Components for Angular
Post Reply
Leah Zar
Posts: 2
Joined: 04 Jun 2023, 07:42

04 Jun 2023, 08:05

Hi,
I use your controls and am very satisfied.
Regarding the auto-complete control, its corresponding value in the object is in a primitive variable, and I see that the control does not know how to show me the value that comes from the DB on the screen properly.
Below is a sample code:

Code: Select all

  <p-autoComplete [required]="true" id="organizationId" [(ngModel)]="requestUpdateField.organizationId"  [forceSelection]="true"
            inputId="organizationId" name="organizationId" field="OrganizationName" #organizationId="ngModel"
              [suggestions]="organizationFilterList" (completeMethod)="filterOrganization($event)">
</p-autoComplete>
The property is defined as follows:

Code: Select all

  organizationId?: string;
why is not it working?
Thanks for the solution.
Thanks,
Leah

Leah Zar
Posts: 2
Joined: 04 Jun 2023, 07:42

12 Jun 2023, 09:51

solution????

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests