This repository was archived by the owner on Jun 22, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/lib/table/services/selection Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @angular-ru/ng-table-builder" ,
3- "version" : " 3.0.0 " ,
3+ "version" : " 3.0.1 " ,
44 "license" : " MIT" ,
55 "bugs" : {
66 "url" : " https://github.com/Angular-RU/ng-table-builder/issues"
Original file line number Diff line number Diff line change @@ -44,18 +44,18 @@ export class SelectionService implements OnDestroy {
4444 this . onChanges . next ( ) ;
4545 }
4646
47- public toggleAll ( rows : TableRow [ ] ) : void {
47+ public toggleAll ( rows : TableRow [ ] | null ) : void {
4848 window . clearInterval ( this . selectionTaskIdle ! ) ;
4949
5050 if ( this . selectionModel . toggledAll ) {
5151 this . selectionModel . toggledAll = false ;
5252 this . selectionModel . clear ( ) ;
5353 } else {
5454 this . selectionModel . toggledAll = true ;
55- rows . forEach ( ( row : TableRow ) : void => this . selectionModel . select ( this . getIdByRow ( row ) , row , false ) ) ;
55+ ( rows ?? [ ] ) . forEach ( ( row : TableRow ) : void => this . selectionModel . select ( this . getIdByRow ( row ) , row , false ) ) ;
5656 }
5757
58- this . checkIsAllSelected ( rows ) ;
58+ this . checkIsAllSelected ( rows ?? [ ] ) ;
5959 }
6060
6161 public reset ( ) : void {
You can’t perform that action at this time.
0 commit comments