primeng turbo table

UI Components for Angular
Post Reply
Geek5
Posts: 2
Joined: 19 Sep 2018, 16:29

21 Sep 2018, 10:17

- What is the correct way to integrate a checkbox within a turbo table within an angular form(<form #myForm="ngForm>"),
which receives it's value(boolean) from a loaded model. Currently I have tried to integrate one like so...

<form #myForm="ngForm">
<p-table [columns]="model" [(value)]="model">
<ng-template pTemplate="body" let-model>
<tr [pSelectableRow]="model">

<td pEditableColumn>

<p-checkbox name="aName" [(ngModel)]="model.property" binary="true" [ngModelOptions]="{standalone: true}"></p-checkbox>

</td>

</tr>
</ng-template>
</p-table>

- With "[ngModelOptions]={standalon: true}", the values load correctly, however the form will not recognize the value change after a check.

PhilHuhn
Posts: 177
Joined: 19 Sep 2018, 02:52
Location: Ann Arbor, Michigan USA
Contact:

21 Sep 2018, 13:31

Check out, under the Input category:
https://www.primefaces.org/primeng/#/checkbox

Geek5
Posts: 2
Joined: 19 Sep 2018, 16:29

23 Sep 2018, 08:59

Thank you for your reply.

I found a partial solution to my problem


Instead of using this Format:

<p-checkbox name="aName" [(ngModel)]="model.property" binary="true" [ngModelOptions]="{standalone: true}"></p-checkbox>


I was able to provide the values from the model using this one:

<p-checkbox name="aName{{model.property}}" [(ngModel)]="model.property" binary="true"></p-checkbox>

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests