The Autocomplete suggestions are opened for all the columns of all rows irrespective of desired column for a specific row.
Here is the code-snippet:
Code: Select all
<p-dataTable [value]="cars" [editable]="true">
<p-column field="vin" header="Vin" [editable]="true"></p-column>
<p-column field="year" header="Year" [style]="{'overflow':'visible'}">
<template let-col let-car="rowData">
<p-autoComplete [(ng-model)]="country" [suggestions]="filteredCountriesSingle" (completeMethod)="filterCountrySingle($event)"
field="name" [size]="30" [minLength]="1">
</p-autoComplete>
</template>
</p-column>
<p-column field="brand" header="Brand" [editable]="true">
</p-column>
<p-column field="color" header="Color" [style]="{'overflow':'visible'}">
<template let-col let-car="rowData">
<p-dropdown [options]="cities" [(ng-model)]="selectedCity" [style]="{'width':'150px'}"></p-dropdown>
</template>
</p-column>
</p-dataTable>
Any help is much appreciated.