File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed
projects/igniteui-angular/src/lib/grids/pivot-grid Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 1717 (dragLeave) ="onDimDragLeave($event) "
1818 (dragDrop) ="onDimDrop($event, filterArea, 2) "
1919 >
20- < igx-icon igxPrefix (pointerdown) ='onFilteringIconClick($event, filter) '> filter_list</ igx-icon >
20+ < igx-icon igxPrefix (pointerdown) ='onFilteringIconPointerDown($event) ' (click) =' onFilteringIconClick($event, filter) '> filter_list</ igx-icon >
2121 {{filter.fieldName}}
2222 </ igx-chip >
2323 </ igx-chips-area >
4242 (dragDrop) ="onDimDrop($event, colArea, 1) "
4343 >
4444 < igx-icon igxPrefix > view_column</ igx-icon >
45- < igx-icon (pointerdown) ='onFilteringIconClick($event, col) '> filter_list</ igx-icon >
45+ < igx-icon igxPrefix (pointerdown) =' onFilteringIconPointerDown($event) ' (click ) ='onFilteringIconClick($event, col) '> filter_list</ igx-icon >
4646 {{col.fieldName}}
4747 </ igx-chip >
4848 </ igx-chips-area >
9393 (dragDrop) ="onDimDrop($event, rowArea, 0) "
9494 >
9595 < igx-icon igxPrefix > table_rows</ igx-icon >
96- < igx-icon igxPrefix (pointerdown) ='onFilteringIconClick($event, row) '> filter_list</ igx-icon >
96+ < igx-icon igxPrefix (pointerdown) ='onFilteringIconPointerDown($event) ' (click) =' onFilteringIconClick($event, row) '> filter_list</ igx-icon >
9797 {{ row.fieldName}}
9898 </ igx-chip >
9999 </ igx-chips-area >
Original file line number Diff line number Diff line change @@ -72,24 +72,25 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
7272 filter . enabled = false ;
7373 }
7474
75+ public onFilteringIconPointerDown ( event ) {
76+ event . stopPropagation ( ) ;
77+ event . preventDefault ( ) ;
78+ }
79+
7580 public onFilteringIconClick ( event , dimension ) {
7681 event . stopPropagation ( ) ;
7782 event . preventDefault ( ) ;
78- // we are bound on pointerdown but excel filter listens on document click and closes :(
79- setTimeout ( ( ) => {
80- let dim = dimension ;
81- let col ;
82- while ( dim ) {
83- col = this . grid . originalDataColumns . find ( x => x . field === dim . fieldName || x . field === dim . member ) ;
84- if ( col ) {
85- break ;
86- } else {
87- dim = dimension . childLevels [ 0 ] ;
88- }
83+ let dim = dimension ;
84+ let col ;
85+ while ( dim ) {
86+ col = this . grid . originalDataColumns . find ( x => x . field === dim . fieldName || x . field === dim . member ) ;
87+ if ( col ) {
88+ break ;
89+ } else {
90+ dim = dimension . childLevels [ 0 ] ;
8991 }
90- this . grid . filteringService . toggleFilterDropdown ( event . target , col ) ;
91- } , 100 ) ;
92-
92+ }
93+ this . grid . filteringService . toggleFilterDropdown ( event . target , col ) ;
9394 }
9495
9596 public onDimDragEnter ( event , dimension : PivotDimensionType ) {
You can’t perform that action at this time.
0 commit comments