@@ -604,31 +604,6 @@ export class IgxGridComponent extends IgxGridBaseComponent implements IGridDataB
604604 this . notifyChanges ( true ) ;
605605 }
606606
607- /**
608- * Checks whether `IgxColumnComponent` has an element without a `[field]`.
609- * Supports both single instance of the `ISortingExpression` and an array of elements.
610- * ```typescript
611- * this.grid.checkIfNoField({ fieldName: name, dir: SortingDirection.Asc, ignoreCase: false });
612- * this.grid.checkIfNoField([
613- { fieldName: name1, dir: SortingDirection.Asc, ignoreCase: false },
614- { fieldName: name2, dir: SortingDirection.Desc, ignoreCase: true },
615- { fieldName: name3, dir: SortingDirection.Desc, ignoreCase: false }
616- ]);
617- * ```
618- * @memberof IgxGridComponent
619- */
620- public checkIfNoField ( expression : IGroupingExpression | Array < IGroupingExpression > | any ) : boolean {
621- if ( expression instanceof Array ) {
622- for ( const singleExpression of expression ) {
623- if ( singleExpression . fieldName === undefined ) {
624- return true ;
625- }
626- }
627- return false ;
628- }
629- return expression . fieldName === undefined ;
630- }
631-
632607 /**
633608 * Clears all grouping in the grid, if no parameter is passed.
634609 * If a parameter is provided, clears grouping for a particular column or an array of columns.
@@ -1020,4 +995,17 @@ export class IgxGridComponent extends IgxGridBaseComponent implements IGridDataB
1020995 this . navigation . grid = this ;
1021996 }
1022997 }
998+
999+ public checkIfNoField ( expression : IGroupingExpression | Array < IGroupingExpression > | any ) : boolean {
1000+ if ( expression instanceof Array ) {
1001+ for ( const singleExpression of expression ) {
1002+ if ( ! singleExpression . fieldName ) {
1003+ return true ;
1004+ }
1005+ }
1006+ return false ;
1007+ }
1008+ return ! expression . fieldName ;
1009+ }
1010+
10231011}
0 commit comments