primeng icon indicating copy to clipboard operation
primeng copied to clipboard

problem with p-tableRadioButton

Open IngAlejandroSalazar opened this issue 8 years ago • 3 comments

When selecting a row as seen in the photo (Row Id 12), the entire table is selected.

[img]https://preview.ibb.co/h6UMno/row.jpg[/img]

Codigo:

<p-table [value]="data['entities'].values" [(selection)]="objSelectd" dataKey="vin" [paginator]="true" [rows]="10"> <tr *ngFor="let th of data['entities'].header"> <td *ngFor="let t of th">{{t}} Actions

					<ng-template pTemplate="body" let-rowData >
						<tr [pSelectableRow]="rowData[1]">
							<td>
								<p-tableRadioButton  [value]="rowData[0]"></p-tableRadioButton>
							</td>
							<td *ngFor="let col of rowData">
								{{col}}
							</td>
						<td><a class="btn btn-light">Edit</a></td>
						</tr>
					</ng-template>
					<ng-template pTemplate="summary">
						<div style="text-align: left">
							Selected row: {{objSelectd}}
						</div>
					</ng-template>
				</p-table>

IngAlejandroSalazar avatar Jun 06 '18 12:06 IngAlejandroSalazar

Whatever [pSelectableRow]="rowData[1]" and [value]="rowData[0]" are is probably always the same value.

This is a question not an issue with the framework from a quick look. Try https://forum.primefaces.org/ if you need further assistance. Otherwise make a stackblitz if you still believe this is an error with the framework and not your code.

JacobSiegle avatar Jun 06 '18 17:06 JacobSiegle

Can you explain more on this , what is wrong and what need to be done in this not an issue with the framework thing..

flowfreeconsumer avatar Jul 02 '18 05:07 flowfreeconsumer

I'm unable to replicate with the latest PrimeNG. If the issue still persists with the new version please create a new issue with our stackblitz template.

cagataycivici avatar Jan 11 '19 11:01 cagataycivici