dimanche 29 novembre 2020

how to Disable checkboxes for particular row on table data which comes from service

I have a table where it consists of two columns NoBill and Bill which contains checkbox as values.

When I click the Bill checkbox of a particular row the Nobill checkbox of that particular row gets disabled and viceversa.

When I try to implement the stackblitz code into mine in the VS Code, and when I click the Bill checkbox all the column values of Nobill checkbox gets disabled. Only the checkbox in that particular row alone have to be disabled

I am confused how one code working in stackblitz wont work in my VS Code

The only difference between the stackblitz and my VS code is that in stackblitz I used a hardcoded list and in VScode I get it from a service

My sample code of where I get the list(data) from service.

Note: Kindly comment if you have any doubts about the question

getlist() {
    this.service.getlist()
      .subscribe((result) => {
        let datas = result['data'];
        this.listes = datas;
      })

  }

My stackblitz link: https://stackblitz.com/edit/angular-ivy-bjul9q?file=src%2Fapp%2Fapp.component.ts




Aucun commentaire:

Enregistrer un commentaire