Problem rendering autocomplete within Datatable.

UI Components for Angular
Post Reply
sumanprimeng
Posts: 1
Joined: 03 Aug 2016, 08:59

03 Aug 2016, 13:45

i have a problem rendering autocomplete within Datatable.
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>
Below is the Issue:

Image


Any help is much appreciated.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests