File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
projects/igniteui-angular/src/lib/grids/toolbar Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 3131 < span > {{ grid.hiddenColumnsText }}</ span >
3232 </ div >
3333 </ button >
34- < igx-drop-down #columnHidingDropdown (onClosing) ="onClosingDropDown ($event) ">
34+ < igx-drop-down #columnHidingDropdown (onClosing) ="onClosingColumnHiding ($event) ">
3535 < igx-column-hiding
3636 [columns] ="grid.columns "
3737 [title] ="grid.columnHidingTitle "
5252 < span > </ span >
5353 </ div >
5454 </ button >
55- < igx-drop-down #columnPinningDropdown (onClosing) ="onClosingDropDown ($event) ">
55+ < igx-drop-down #columnPinningDropdown (onClosing) ="onClosingColumnPinning ($event) ">
5656 < igx-column-pinning
5757 [columns] ="grid.columns "
5858 [title] ="grid.columnPinningTitle "
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ export class IgxGridToolbarComponent extends DisplayDensityBase implements After
236236 @Optional ( ) public csvExporter : IgxCsvExporterService ,
237237 @Optional ( ) @Inject ( DisplayDensityToken ) protected _displayDensityOptions : IDisplayDensityOptions ,
238238 private iconService : IgxIconService ) {
239- super ( _displayDensityOptions ) ;
239+ super ( _displayDensityOptions ) ;
240240 }
241241
242242 private _positionSettings : PositionSettings = {
@@ -414,11 +414,22 @@ export class IgxGridToolbarComponent extends DisplayDensityBase implements After
414414 /**
415415 * @hidden @internal
416416 */
417- public onClosingDropDown ( args ) {
417+ public onClosingColumnHiding ( args ) {
418+ const activeElem = document . activeElement ;
419+
420+ if ( ! args . event && activeElem !== this . grid . nativeElement &&
421+ ! this . columnHidingButton . nativeElement . contains ( activeElem ) ) {
422+ args . cancel = true ;
423+ }
424+ }
425+
426+ /**
427+ * @hidden @internal
428+ */
429+ public onClosingColumnPinning ( args ) {
418430 const activeElem = document . activeElement ;
419431
420432 if ( ! args . event && activeElem !== this . grid . nativeElement &&
421- ! this . columnHidingButton . nativeElement . contains ( activeElem ) &&
422433 ! this . columnPinningButton . nativeElement . contains ( activeElem ) ) {
423434 args . cancel = true ;
424435 }
You can’t perform that action at this time.
0 commit comments