How Create P-table edtor + FormArray

UI Components for Angular
Post Reply
testh
Posts: 1
Joined: 29 Jul 2020, 12:23

29 Jul 2020, 12:32

Hello,

i have follow this example for P-table but i want add FormControl dynamic on my editable row

https://stackblitz.com/edit/primeng-tab ... p%2Fcar.ts


or with this discuting metod but don't work

Code: Select all

 /*Update Taches*/
  public onRowEditSave(data, index) {
    if(data.name == null || data.name == ''){
       data.name.setErrors({ empty: true });
    }
    if(data.name.length>25){
       data.name.setErrors({ maxlength: true });
    }
    if(data.color == null || data.color == ''){
       data.color.setErrors({ empty: true });
    }
    data.color = data.color.toHexString();
    this.priorityService.putPriority(data.id, data).subscribe(data => {
      console.log('Update done');
    }, error => {
      console.log(error);
    });
  }

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests