Skip to content

Commit 139f8e2

Browse files
Merge branch '18.0.x' into ikitanov/fix-#14297-18.0.x
2 parents 5e89306 + a2c706e commit 139f8e2

17 files changed

+224
-54
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
@@ -250,21 +250,6 @@
250250
}
251251
}
252252

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

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
@@ -110,6 +110,11 @@
110110
@extend %grid-excel-actions__action !optional;
111111
}
112112

113+
@include e(actions-filter, $m: active) {
114+
@extend %grid-excel-actions__action !optional;
115+
@extend %grid-excel-actions__action--active !optional;
116+
}
117+
113118
@include e(actions-clear) {
114119
@extend %grid-excel-actions__action !optional;
115120
}

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
@@ -309,6 +309,11 @@
309309
}
310310
}
311311

312+
%grid-excel-actions__action--active {
313+
background: color($color: 'gray', $variant: 100);
314+
color: var-get($theme, 'excel-filtering-actions-hover-foreground');
315+
}
316+
312317
%grid-excel-actions__action--disabled {
313318
color: var-get($theme, 'excel-filtering-actions-disabled-foreground');
314319
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

@@ -287,11 +287,11 @@ export class IgxDropDownItemBaseDirective implements DoCheck {
287287
if (this._selected) {
288288
const dropDownSelectedItem = this.dropDown.selectedItem;
289289
if (!dropDownSelectedItem) {
290-
this.dropDown.selectItem(this);
290+
this.dropDown.selectItem(this, undefined, false);
291291
} else if (this.hasIndex
292292
? this._index !== dropDownSelectedItem.index || this.value !== dropDownSelectedItem.value :
293293
this !== dropDownSelectedItem) {
294-
this.dropDown.selectItem(this);
294+
this.dropDown.selectItem(this, undefined, false);
295295
}
296296
}
297297
}

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
@@ -193,7 +193,7 @@ export abstract class IgxDropDownBaseDirective implements IDropDownList, OnInit
193193
@Inject(DOCUMENT) public document: any) {}
194194

195195
public ngOnInit(): void {
196-
this.computedStyles = this.document.defaultView.getComputedStyle(this.elementRef.nativeElement);
196+
this.computedStyles = this.document.defaultView.getComputedStyle(this.elementRef.nativeElement);
197197
}
198198

199199
/** Keydown Handler */
@@ -214,7 +214,7 @@ export abstract class IgxDropDownBaseDirective implements IDropDownList, OnInit
214214
* @param newSelection the item selected
215215
* @param event the event that triggered the call
216216
*/
217-
public selectItem(newSelection?: IgxDropDownItemBaseDirective, event?: Event) { // eslint-disable-line
217+
public selectItem(newSelection?: IgxDropDownItemBaseDirective, event?: Event, emit = true) { // eslint-disable-line
218218
this.selectionChanging.emit({
219219
newSelection,
220220
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
@@ -75,6 +75,6 @@ export interface IDropDownBase extends IDropDownList, IToggleView {
7575
closed: EventEmitter<IBaseEventArgs>;
7676
allowItemsFocus?: boolean;
7777
setSelectedItem(index: number): void;
78-
selectItem(item: IgxDropDownItemBaseDirective, event?: Event): void;
78+
selectItem(item: IgxDropDownItemBaseDirective, event?: Event, emit?: boolean): void;
7979
}
8080

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
@@ -513,15 +513,16 @@ export class IgxDropDownComponent extends IgxDropDownBaseDirective implements ID
513513
}
514514
}
515515

516-
/**
516+
/**
517517
* Handles the `selectionChanging` emit and the drop down toggle when selection changes
518518
*
519519
* @hidden
520520
* @internal
521521
* @param newSelection
522522
* @param event
523+
* @param emit
523524
*/
524-
public override selectItem(newSelection?: IgxDropDownItemBaseDirective, event?: Event) {
525+
public override selectItem(newSelection?: IgxDropDownItemBaseDirective, event?: Event, emit = true) {
525526
const oldSelection = this.selectedItem;
526527
if (!newSelection) {
527528
newSelection = this.focusedItem;
@@ -539,7 +540,10 @@ export class IgxDropDownComponent extends IgxDropDownBaseDirective implements ID
539540
} as IgxDropDownItemBaseDirective;
540541
}
541542
const args: ISelectionEventArgs = { oldSelection, newSelection, cancel: false, owner: this };
542-
this.selectionChanging.emit(args);
543+
544+
if (emit) {
545+
this.selectionChanging.emit(args);
546+
}
543547

544548
if (!args.cancel) {
545549
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

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

0 commit comments

Comments
 (0)