how to bind to a function for p-DropDown

UI Components for Angular
Post Reply
jbarnes
Posts: 1
Joined: 14 Sep 2020, 23:47

14 Sep 2020, 23:55

I have a dropdown that is within a table; it has to activate the neighboring cell in the row to be editable. All the previous statement works. except, the onCodeType function isn't being called on selection.

Code: Select all

            <ng-template pTemplate="body" let-device>
                <tr>

                    <td pEditableColumn>
                        <p-cellEditor>
                            <ng-template pTemplate="input">
                                <p-dropdown [options]="code_types" [(ngModel)]="device.code_type"
                                    (change)="onCodeType($event)"></p-dropdown>
                            </ng-template>
                            <ng-template pTemplate="output">
                                {{device.code_type}}
                            </ng-template>
                        </p-cellEditor>
                    </td>
                    ...

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests