@@ -186,6 +186,7 @@ import { getCurrentResourceStrings } from '../core/i18n/resources';
186186import { isTree , recreateTree , recreateTreeFromFields } from '../data-operations/expressions-tree-util' ;
187187import { getUUID } from './common/random' ;
188188import { DefaultMergeStrategy , IGridMergeStrategy } from '../data-operations/merge-strategy' ;
189+ import { IgxActionStripComponent , IgxGridPinningActionsComponent } from 'igniteui-angular' ;
189190
190191interface IMatchInfoCache {
191192 row : any ;
@@ -7836,7 +7837,7 @@ export abstract class IgxGridBaseDirective implements GridType,
78367837 const keepActionStrip =
78377838 ! ! context ?. pinned &&
78387839 ! ! contextEl ?. isConnected &&
7839- ! ( this . actionStrip ?. menuItems ?. length > 0 ) ;
7840+ ! this . hasMenuPinningActions ( ) ;
78407841
78417842 if ( ! keepActionStrip ) {
78427843 if ( this . actionStrip ) {
@@ -7852,6 +7853,22 @@ export abstract class IgxGridBaseDirective implements GridType,
78527853 this . gridScroll . emit ( args ) ;
78537854 }
78547855
7856+ protected hasMenuPinningActions ( ) : boolean {
7857+ const strip = this . actionStrip as IgxActionStripComponent ;
7858+ if ( ! strip ?. actionButtons ?. length ) {
7859+ return false ;
7860+ }
7861+
7862+ let hasMenuPinningActions = false ;
7863+ strip . actionButtons . forEach ( ( button ) => {
7864+ if ( button instanceof IgxGridPinningActionsComponent && button . asMenuItems ) {
7865+ hasMenuPinningActions = true ;
7866+ }
7867+ } ) ;
7868+
7869+ return hasMenuPinningActions ;
7870+ }
7871+
78557872 protected horizontalScrollHandler ( event ) {
78567873 const scrollLeft = event . target . scrollLeft ;
78577874 this . headerContainer . onHScroll ( scrollLeft ) ;
0 commit comments