p-autocomplete angular2 help text

UI Components for Angular
Post Reply
shivagarwal
Posts: 9
Joined: 14 Jun 2016, 16:11

23 Jun 2016, 14:16

In p-autocomplete instead of placeholder i want a dropdown list item with the help text. This list item should be visible when p-autocomplete input field gets the focus. i.e. when user clicks in the field it should show the list-item with help text.

<div class="ui-grid-row">
<div class="ui-grid-col-2 label-font-property">Vendor's Surname</div>
<div class="ui-grid-col-10">
<p-autoComplete [(ngModel)]="selectedVendorPurchaser" [suggestions]="vendorPurchasers"
(completeMethod)="searchVendor($event)" field="nameOnDocument" [minLength]="1" [delay]="300" maxlength="15" size="62" (onSelect)="dataSelectedVendor()" placeholder="Type to search">
<template #vendorPurchaser>
<li>Type to search </li>
<li class="ui-autocomplete-list-item ui-helper-clearfix">
<span>{{vendorPurchaser.lastName}}&nbsp;{{vendorPurchaser.firstName}}</span>
</li>
</template>
</p-autoComplete>
</div>
</div>

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests