File tree 1 file changed +4
-2
lines changed
projects/igniteui-angular/src/lib/grid 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -526,7 +526,8 @@ export class IgxGroupAreaDropDirective extends IgxDropDirective {
526
526
public onDragEnter ( event ) {
527
527
const drag : IgxColumnMovingDragDirective = event . detail . owner ;
528
528
const column : IgxColumnComponent = drag . column ;
529
- if ( column . groupable ) {
529
+ const isGrouped = column . grid . groupingExpressions . findIndex ( ( item ) => item . fieldName === column . field ) !== - 1 ;
530
+ if ( column . groupable && ! isGrouped ) {
530
531
drag . icon . innerText = 'group_work' ;
531
532
this . hovered = true ;
532
533
} else {
@@ -544,7 +545,8 @@ export class IgxGroupAreaDropDirective extends IgxDropDirective {
544
545
const drag : IgxColumnMovingDragDirective = event . detail . owner ;
545
546
if ( drag instanceof IgxColumnMovingDragDirective ) {
546
547
const column : IgxColumnComponent = drag . column ;
547
- if ( column . groupable ) {
548
+ const isGrouped = column . grid . groupingExpressions . findIndex ( ( item ) => item . fieldName === column . field ) !== - 1 ;
549
+ if ( column . groupable && ! isGrouped ) {
548
550
column . grid . groupBy ( { fieldName : column . field , dir : SortingDirection . Asc , ignoreCase : column . sortingIgnoreCase } ) ;
549
551
}
550
552
}
You can’t perform that action at this time.
0 commit comments