I am using angular and I am trying to do reusable actions like bulk updates,bulk deletes,bulk deactivates.

I used all these actions in another component and want to used it as generic method.

Which means, i have two components: parent component and child component.

**Parent Component:**

In parent component , I am using a table(each row with checkbox).
 In check box I used a method,

```
  rowDataCheck(event, rowData) {
    if (event.target.checked) {
      this.groupList.push(rowData);
     } else {
      this.groupList = this.groupList.filter(item => item.id !== rowData.id);
     } 
  }

```

And the value is storing in `grouplist[]`. When page onloads(ngOnint) the `groupList=[]`. 
for eg:-

```
1. when ngOnit() loads = this.grouplist=[];

2. when I check 1st row = this.grouplist=[1];

3. when I check 2st row = this.grouplist=[1,2];

4. Unchecking and checking changes the groupList value(conditions give above)

```

**Child component:**

After the checkbox selection I want to pass the groupList value into child component. 

**Problem::**

For passing the values from parent to child I used @input method.. But the child component is working only when the page loads.. I need to pass the value from parent to child when the checkbox selects for each time.

Please check this [stackblitz](https://stackblitz.com/edit/angular-ivy-oui6mj?file=src%2Fapp%2Fapp.component.ts)