p-table

PrimeNG table: how to start a cell edit?

我怕爱的太早我们不能终老 提交于 2020-12-13 11:29:18
问题 I've got a PrimeNG p-table with a number of columns and rows, one column uses an input as its cell editor. Compact version below: <p-table [value]="rowDatas" selectionMode="single" [(selection)]="selectedRowData"> <ng-template pTemplate="body" let-rowData let-rowIndex="rowIndex"> <tr [pSelectableRow]="rowData"> <td pEditableColumn> <p-cellEditor> <ng-template pTemplate="input"> <input id="{{'hours' + rowIndex}}" pInputText type="text" [(ngModel)]="rowData.hours"> </ng-template> <ng-template

PrimeNG table: how to start a cell edit?

早过忘川 提交于 2020-12-13 11:29:08
问题 I've got a PrimeNG p-table with a number of columns and rows, one column uses an input as its cell editor. Compact version below: <p-table [value]="rowDatas" selectionMode="single" [(selection)]="selectedRowData"> <ng-template pTemplate="body" let-rowData let-rowIndex="rowIndex"> <tr [pSelectableRow]="rowData"> <td pEditableColumn> <p-cellEditor> <ng-template pTemplate="input"> <input id="{{'hours' + rowIndex}}" pInputText type="text" [(ngModel)]="rowData.hours"> </ng-template> <ng-template