vendredi 29 octobre 2021

Unbind checkbox selection while clicking on mat table row

I am unable to unbind the selection of checkbox. Please someone who has worked on this before can help me with this code, it would be great.

Reference is Material Table this. I tried removing the toggle but that didnt help as my datas in table did not populate

                                <ng-container matColumnDef="select">
                                  <th mat-header-cell *matHeaderCellDef >
                                    <mat-checkbox (change)="$event ? masterToggle() : null"
                                                  [checked]="selection.hasValue() && isAllSelected()"
                                                  [indeterminate]="selection.hasValue() && !isAllSelected()" (click)="selectAllCheck(isAllSelected(), $event)">
                                    </mat-checkbox>
                                  </th>
                                  <td class="checkbox-area" style="width: 1% !important; padding: 20px !important;  background-color: transparent; border: none;" mat-cell *matCellDef="let row; let i=index" >
                                   
                                        <mat-checkbox (click)="$event.stopPropagation()" 
                                                  (change)="$event ? selection.toggle(row) : null" 
                                                  [checked]="selection.isSelected(row)" (click)="specificSelect(row , selection.isSelected(row))"> 
                                                  
                                    </mat-checkbox>



Aucun commentaire:

Enregistrer un commentaire