@@ -108,7 +108,7 @@ import { IgxGridRowComponent } from './grid-row.component';
108108import { IgxGridGroupByAreaComponent } from './grouping/grid-group-by-area.component' ;
109109import { IgxPaginatorToken , type IgxPaginatorComponent } from 'igniteui-angular/paginator' ;
110110import { IgxSnackbarComponent } from 'igniteui-angular/snackbar' ;
111- import { CharSeparatedValueData , DropPosition , FilterMode , getUUID , GridCellMergeMode , GridKeydownTargetType , GridPagingMode , GridSelectionMode , GridSelectionRange , GridServiceType , GridSummaryPosition , GridType , GridValidationTrigger , IActiveNode , IActiveNodeChangeEventArgs , ICellPosition , IClipboardOptions , IColumnMovingEndEventArgs , IColumnMovingEventArgs , IColumnMovingStartEventArgs , IColumnResizeEventArgs , IColumnsAutoGeneratedEventArgs , IColumnSelectionEventArgs , IColumnVisibilityChangedEventArgs , IColumnVisibilityChangingEventArgs , IFilteringEventArgs , IGridCellEventArgs , IGridClipboardEvent , IGridContextMenuEventArgs , IGridEditDoneEventArgs , IGridEditEventArgs , IGridFormGroupCreatedEventArgs , IGridKeydownEventArgs , IGridRowEventArgs , IGridScrollEventArgs , IGridToolbarExportEventArgs , IGridValidationStatusEventArgs , IGX_GRID_SERVICE_BASE , IgxAdvancedFilteringDialogComponent , IgxCell , IgxColumnComponent , IgxColumnGroupComponent , IgxColumnResizingService , IgxDragIndicatorIconDirective , IgxEditRow , IgxExcelStyleHeaderIconDirective , IgxExcelStyleLoadingValuesTemplateDirective , IgxFilteringService , IgxGridBodyDirective , IgxGridCellComponent , IgxGridColumnResizerComponent , IgxGridEmptyTemplateContext , IgxGridEmptyTemplateDirective , IgxGridExcelStyleFilteringComponent , IgxGridFilteringCellComponent , IgxGridFilteringRowComponent , IgxGridHeaderComponent , IgxGridHeaderGroupComponent , IgxGridHeaderRowComponent , IgxGridHeaderTemplateContext , IgxGridLoadingTemplateDirective , IgxGridNavigationService , IgxGridRowDragGhostContext , IgxGridRowEditActionsTemplateContext , IgxGridRowEditTemplateContext , IgxGridRowEditTextTemplateContext , IgxGridRowTemplateContext , IgxGridSelectionService , IgxGridSummaryService , IgxGridTemplateContext , IgxGridToolbarComponent , IgxGridTransaction , IgxGridValidationService , IgxHeaderCollapsedIndicatorDirective , IgxHeaderExpandedIndicatorDirective , IgxHeadSelectorDirective , IgxHeadSelectorTemplateContext , IgxRowAddTextDirective , IgxRowCollapsedIndicatorDirective , IgxRowDirective , IgxRowDragGhostDirective , IgxRowEditActionsDirective , IgxRowEditTabStopDirective , IgxRowEditTemplateDirective , IgxRowEditTextDirective , IgxRowExpandedIndicatorDirective , IgxRowSelectorDirective , IgxRowSelectorTemplateContext , IgxSortAscendingHeaderIconDirective , IgxSortDescendingHeaderIconDirective , IgxSortHeaderIconDirective , IgxSummaryRowComponent , IgxToolbarToken , IPinColumnCancellableEventArgs , IPinColumnEventArgs , IPinningConfig , IPinRowEventArgs , IRowDataCancelableEventArgs , IRowDataEventArgs , IRowDragEndEventArgs , IRowDragStartEventArgs , IRowSelectionEventArgs , IRowToggleEventArgs , ISearchInfo , ISizeInfo , ISortingEventArgs , RowEditPositionStrategy , RowPinningPosition , RowType , WatchChanges } from 'igniteui-angular/grids/core' ;
111+ import { CharSeparatedValueData , DropPosition , FilterMode , getUUID , GridCellMergeMode , GridKeydownTargetType , GridPagingMode , GridSelectionMode , GridSelectionRange , GridServiceType , GridSummaryPosition , GridType , GridValidationTrigger , IActiveNode , IActiveNodeChangeEventArgs , ICellPosition , IClipboardOptions , IColumnMovingEndEventArgs , IColumnMovingEventArgs , IColumnMovingStartEventArgs , IColumnResizeEventArgs , IColumnsAutoGeneratedEventArgs , IColumnSelectionEventArgs , IColumnVisibilityChangedEventArgs , IColumnVisibilityChangingEventArgs , IFilteringEventArgs , IGridCellEventArgs , IGridClipboardEvent , IGridContextMenuEventArgs , IGridEditDoneEventArgs , IGridEditEventArgs , IGridFormGroupCreatedEventArgs , IGridKeydownEventArgs , IGridRowEventArgs , IGridScrollEventArgs , IGridToolbarExportEventArgs , IGridValidationStatusEventArgs , IGX_GRID_SERVICE_BASE , IgxAdvancedFilteringDialogComponent , IgxCell , IgxColumnComponent , IgxColumnGroupComponent , IgxColumnResizingService , IgxDragIndicatorIconDirective , IgxEditRow , IgxExcelStyleHeaderIconDirective , IgxExcelStyleLoadingValuesTemplateDirective , IgxFilteringService , IgxGridBodyDirective , IgxGridCellComponent , IgxGridColumnResizerComponent , IgxGridEmptyTemplateContext , IgxGridEmptyTemplateDirective , IgxGridExcelStyleFilteringComponent , IgxGridFilteringCellComponent , IgxGridFilteringRowComponent , IgxGridHeaderComponent , IgxGridHeaderGroupComponent , IgxGridHeaderRowComponent , IgxGridHeaderTemplateContext , IgxGridLoadingTemplateDirective , IgxGridNavigationService , IgxGridPinningActionsComponent , IgxGridRowDragGhostContext , IgxGridRowEditActionsTemplateContext , IgxGridRowEditTemplateContext , IgxGridRowEditTextTemplateContext , IgxGridRowTemplateContext , IgxGridSelectionService , IgxGridSummaryService , IgxGridTemplateContext , IgxGridToolbarComponent , IgxGridTransaction , IgxGridValidationService , IgxHeaderCollapsedIndicatorDirective , IgxHeaderExpandedIndicatorDirective , IgxHeadSelectorDirective , IgxHeadSelectorTemplateContext , IgxRowAddTextDirective , IgxRowCollapsedIndicatorDirective , IgxRowDirective , IgxRowDragGhostDirective , IgxRowEditActionsDirective , IgxRowEditTabStopDirective , IgxRowEditTemplateDirective , IgxRowEditTextDirective , IgxRowExpandedIndicatorDirective , IgxRowSelectorDirective , IgxRowSelectorTemplateContext , IgxSortAscendingHeaderIconDirective , IgxSortDescendingHeaderIconDirective , IgxSortHeaderIconDirective , IgxSummaryRowComponent , IgxToolbarToken , IPinColumnCancellableEventArgs , IPinColumnEventArgs , IPinningConfig , IPinRowEventArgs , IRowDataCancelableEventArgs , IRowDataEventArgs , IRowDragEndEventArgs , IRowDragStartEventArgs , IRowSelectionEventArgs , IRowToggleEventArgs , ISearchInfo , ISizeInfo , ISortingEventArgs , RowEditPositionStrategy , RowPinningPosition , RowType , WatchChanges } from 'igniteui-angular/grids/core' ;
112112import { getCurrentI18n , getNumberFormatter , IResourceChangeEventArgs , } from 'igniteui-i18n-core' ;
113113import { I18N_FORMATTER } from 'igniteui-angular/core' ;
114114
@@ -7816,9 +7816,18 @@ export abstract class IgxGridBaseDirective implements GridType,
78167816 this . disableTransitions = false ;
78177817
78187818 this . hideOverlays ( ) ;
7819- this . actionStrip ?. hide ( ) ;
7820- if ( this . actionStrip ) {
7821- this . actionStrip . context = null ;
7819+ const context = this . actionStrip ?. context ;
7820+ const contextEl = context ?. element ?. nativeElement as HTMLElement ;
7821+ const keepActionStrip =
7822+ ! ! context ?. pinned &&
7823+ ! ! contextEl ?. isConnected &&
7824+ ! this . hasMenuPinningActions ( ) ;
7825+
7826+ if ( ! keepActionStrip ) {
7827+ if ( this . actionStrip ) {
7828+ this . actionStrip . hide ( ) ;
7829+ this . actionStrip . context = null ;
7830+ }
78227831 }
78237832 const args : IGridScrollEventArgs = {
78247833 direction : 'vertical' ,
@@ -7828,6 +7837,23 @@ export abstract class IgxGridBaseDirective implements GridType,
78287837 this . gridScroll . emit ( args ) ;
78297838 }
78307839
7840+ protected hasMenuPinningActions ( ) : boolean {
7841+ const strip = this . actionStrip ;
7842+ const actionButtons = strip ?. actionButtons ;
7843+
7844+ if ( ! actionButtons ?. length ) {
7845+ return false ;
7846+ }
7847+
7848+ return actionButtons
7849+ . toArray ( )
7850+ . some (
7851+ ( button ) =>
7852+ button instanceof IgxGridPinningActionsComponent &&
7853+ button . asMenuItems
7854+ ) ;
7855+ }
7856+
78317857 protected horizontalScrollHandler ( event ) {
78327858 const scrollLeft = event . target . scrollLeft ;
78337859 this . headerContainer . onHScroll ( scrollLeft ) ;
0 commit comments