Skip to content

Commit e501504

Browse files
Merge branch '17.2.x' into ganastasov/fix-14324-17.2.x
2 parents 636e5c3 + a79006e commit e501504

17 files changed

+225
-55
lines changed

projects/igniteui-angular/src/lib/core/styles/components/grid-toolbar/_grid-toolbar-component.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
@extend %igx-grid-toolbar__progress-bar !optional;
3939
}
4040

41-
@include e(adv-filter, $m: 'filtered') {
42-
@extend %igx-grid-toolbar__adv-filter--filtered !optional;
43-
}
44-
4541
@include e(dropdown){
4642
@extend %igx-grid-toolbar__dropdown !optional;
4743
}

projects/igniteui-angular/src/lib/core/styles/components/grid-toolbar/_grid-toolbar-theme.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -248,21 +248,6 @@
248248
}
249249
}
250250

251-
%igx-grid-toolbar__adv-filter--filtered {
252-
border-color: color($color: 'secondary') !important;
253-
254-
@if $bootstrap-theme {
255-
border-width: rem(2px);
256-
border-color: color($color: 'primary', $variant: 800) !important;
257-
color: color($color: 'primary', $variant: 800);
258-
259-
&:hover,
260-
&:focus {
261-
background: color($color: 'primary', $variant: 800);
262-
}
263-
}
264-
}
265-
266251
%igx-grid-toolbar__dropdown {
267252
position: relative;
268253
}

projects/igniteui-angular/src/lib/core/styles/components/grid/_excel-filtering-component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@
106106
@extend %grid-excel-actions__action !optional;
107107
}
108108

109+
@include e(actions-filter, $m: active) {
110+
@extend %grid-excel-actions__action !optional;
111+
@extend %grid-excel-actions__action--active !optional;
112+
}
113+
109114
@include e(actions-clear) {
110115
@extend %grid-excel-actions__action !optional;
111116
}

projects/igniteui-angular/src/lib/core/styles/components/grid/_excel-filtering-theme.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@
294294
}
295295
}
296296

297+
%grid-excel-actions__action--active {
298+
background: color($color: 'gray', $variant: 100);
299+
color: var-get($theme, 'excel-filtering-actions-hover-foreground');
300+
}
301+
297302
%grid-excel-actions__action--disabled {
298303
color: var-get($theme, 'excel-filtering-actions-disabled-foreground');
299304
pointer-events: none;

projects/igniteui-angular/src/lib/data-operations/filtering-expressions-tree.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,10 @@ export class FilteringExpressionsTree implements IFilteringExpressionsTree {
150150
for (const expr of expressionsTree.filteringOperands) {
151151
if ((expr instanceof FilteringExpressionsTree)) {
152152
return this.isFilteringExpressionsTreeForColumn(expr, fieldName);
153-
} else {
154-
return (expr as IFilteringExpression).fieldName === fieldName;
153+
} else if ((expr as IFilteringExpression).fieldName === fieldName) {
154+
return true;
155155
}
156156
}
157-
158157
return false;
159158
}
160159
}

projects/igniteui-angular/src/lib/drop-down/drop-down-item.base.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IDropDownBase, IGX_DROPDOWN_BASE } from './drop-down.common';
2-
import { Directive, Input, HostBinding, HostListener, ElementRef, Optional, Inject, DoCheck, Output, EventEmitter, booleanAttribute } from '@angular/core';
2+
import { Directive, Input, HostBinding, HostListener, ElementRef, Optional, Inject, Output, EventEmitter, booleanAttribute, DoCheck } from '@angular/core';
33
import { IgxSelectionAPIService } from '../core/selection';
44
import { IgxDropDownGroupComponent } from './drop-down-group.component';
55

@@ -293,11 +293,11 @@ export class IgxDropDownItemBaseDirective implements DoCheck {
293293
if (this._selected) {
294294
const dropDownSelectedItem = this.dropDown.selectedItem;
295295
if (!dropDownSelectedItem) {
296-
this.dropDown.selectItem(this);
296+
this.dropDown.selectItem(this, undefined, false);
297297
} else if (this.hasIndex
298298
? this._index !== dropDownSelectedItem.index || this.value !== dropDownSelectedItem.value :
299299
this !== dropDownSelectedItem) {
300-
this.dropDown.selectItem(this);
300+
this.dropDown.selectItem(this, undefined, false);
301301
}
302302
}
303303
}

projects/igniteui-angular/src/lib/drop-down/drop-down.base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export abstract class IgxDropDownBaseDirective extends DisplayDensityBase implem
180180
protected cdr: ChangeDetectorRef,
181181
@Optional() @Inject(DisplayDensityToken) protected _displayDensityOptions: IDisplayDensityOptions) {
182182
super(_displayDensityOptions, elementRef);
183-
}
183+
}
184184

185185
/** Keydown Handler */
186186
public onItemActionKey(key: DropDownActionKey, event?: Event) {
@@ -200,7 +200,7 @@ export abstract class IgxDropDownBaseDirective extends DisplayDensityBase implem
200200
* @param newSelection the item selected
201201
* @param event the event that triggered the call
202202
*/
203-
public selectItem(newSelection?: IgxDropDownItemBaseDirective, event?: Event) { // eslint-disable-line
203+
public selectItem(newSelection?: IgxDropDownItemBaseDirective, event?: Event, emit = true) { // eslint-disable-line
204204
this.selectionChanging.emit({
205205
newSelection,
206206
oldSelection: null,

projects/igniteui-angular/src/lib/drop-down/drop-down.common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ export interface IDropDownBase extends IDropDownList, IToggleView {
7676
closed: EventEmitter<IBaseEventArgs>;
7777
allowItemsFocus?: boolean;
7878
setSelectedItem(index: number): void;
79-
selectItem(item: IgxDropDownItemBaseDirective, event?: Event): void;
79+
selectItem(item: IgxDropDownItemBaseDirective, event?: Event, emit?: boolean): void;
8080
}
8181

projects/igniteui-angular/src/lib/drop-down/drop-down.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,15 +501,16 @@ export class IgxDropDownComponent extends IgxDropDownBaseDirective implements ID
501501
}
502502
}
503503

504-
/**
504+
/**
505505
* Handles the `selectionChanging` emit and the drop down toggle when selection changes
506506
*
507507
* @hidden
508508
* @internal
509509
* @param newSelection
510510
* @param event
511+
* @param emit
511512
*/
512-
public override selectItem(newSelection?: IgxDropDownItemBaseDirective, event?: Event) {
513+
public override selectItem(newSelection?: IgxDropDownItemBaseDirective, event?: Event, emit = true) {
513514
const oldSelection = this.selectedItem;
514515
if (!newSelection) {
515516
newSelection = this.focusedItem;
@@ -527,7 +528,10 @@ export class IgxDropDownComponent extends IgxDropDownBaseDirective implements ID
527528
} as IgxDropDownItemBaseDirective;
528529
}
529530
const args: ISelectionEventArgs = { oldSelection, newSelection, cancel: false, owner: this };
530-
this.selectionChanging.emit(args);
531+
532+
if (emit) {
533+
this.selectionChanging.emit(args);
534+
}
531535

532536
if (!args.cancel) {
533537
if (this.isSelectionValid(args.newSelection)) {

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-conditional-filter.component.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<ng-container *ngIf="esf.column">
22
<div tabindex="0"
33
class="igx-excel-filter__actions-filter"
4+
[ngClass]="filterNumber > 0 ? 'igx-excel-filter__actions-filter--active' : ''"
45
(keydown)="onTextFilterKeyDown($event)"
56
(click)="onTextFilterClick($event)"
67
[igxDropDownItemNavigation]="subMenu"
78
role="menuitem"
89
aria-haspopup="true"
910
[attr.aria-controls]="this.subMenu.listId"
1011
[attr.aria-activedescendant]="!this.subMenu.collapsed ? this.subMenu.focusedItem?.id : null">
11-
<span>{{ subMenuText }}</span>
12+
<span class="igx-excel-filter__filter-number">{{ subMenuText }} <ng-container *ngIf="filterNumber > 0">({{filterNumber}})</ng-container></span>
1213
<igx-icon>keyboard_arrow_right</igx-icon>
1314
</div>
1415

@@ -21,13 +22,15 @@
2122
<div>
2223
<igx-drop-down-item
2324
*ngFor="let condition of conditions"
25+
[selected]="getSelectedCondition(condition)"
2426
[value]="condition">
2527
<div class="igx-grid__filtering-dropdown-items">
2628
<igx-icon family="imx-icons" [name]="getCondition(condition).iconName"></igx-icon>
2729
<span class="igx-grid__filtering-dropdown-text">{{ translateCondition(condition) }}</span>
2830
</div>
2931
</igx-drop-down-item>
30-
<igx-drop-down-item *ngIf="showCustomFilterItem()">
32+
<igx-drop-down-item *ngIf="showCustomFilterItem()"
33+
[selected]="getSelectedCondition('custom')" >
3134
<div class="igx-grid__filtering-dropdown-items">
3235
<igx-icon>filter_list</igx-icon>
3336
<span class="igx-grid__filtering-dropdown-text">{{ esf.grid.resourceStrings.igx_grid_excel_custom_filter }}</span>

0 commit comments

Comments
 (0)