Skip to content

Commit 91d6396

Browse files
authored
Merge branch 'master' into SKrastev/fix-1639-master
2 parents 310c98f + 8492b11 commit 91d6396

27 files changed

+1453
-1259
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ All notable changes for each version of this project will be documented in this
88
- `IgxOverlayOutlet` directive introducedto mark an element as an `igxOverlay` outlet container. [ReadMe](https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/directives/toggle/README.md)
99
- `igxButtonGroup`
1010
- Added the ability to define buttons directly in the template
11+
- `IgxTextHighlightDirective`: The `highlight` method now has a new optional parameter called `exactMatch` (defaults to false).
12+
- If its value is false, all occurrences of the search text will be highlighted in the group's value.
13+
- If its value is true, the entire group's value should equals the search text in order to be highlighted (caseSensitive argument is respected as well).
14+
- `IgxGrid`: The `findNext` and `findPrev` methods now have a new optional parameter called `exactMatch` (defaults to false).
15+
- If its value is false, all occurrences of the search text will be highlighted in the grid's cells.
16+
- If its value is true, the entire value of each cell should equals the search text in order to be highlighted (caseSensitive argument is respected as well).
1117

1218
## 6.1.3
1319
- **General**

projects/igniteui-angular/src/lib/combo/combo.component.spec.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,27 @@ describe('igxCombo', () => {
14811481
expectedOutput += ', ' + combo.data[9];
14821482
expect(inputElement.value).toEqual(expectedOutput);
14831483
}));
1484+
1485+
it('Should properly handle selection manipulation through onSelectionChange emit', fakeAsync(() => {
1486+
const fixture = TestBed.createComponent(IgxComboSampleComponent);
1487+
fixture.detectChanges();
1488+
const combo = fixture.componentInstance.combo;
1489+
// override selection
1490+
fixture.componentInstance.onSelectionChange = (event) => {
1491+
event.newSelection = [];
1492+
};
1493+
combo.toggle();
1494+
tick();
1495+
// No items are initially selected
1496+
expect(combo.selectedItems()).toEqual([]);
1497+
// Select the first 5 items
1498+
combo.selectItems(fixture.componentInstance.initData.splice(0, 5));
1499+
tick();
1500+
fixture.detectChanges();
1501+
tick();
1502+
// onSelectionChange fires and overrides the selection to be [];
1503+
expect(combo.selectedItems()).toEqual([]);
1504+
}));
14841505
});
14851506

14861507
describe('Rendering tests: ', () => {
@@ -3057,7 +3078,8 @@ class IgxComboScrollTestComponent {
30573078
@Component({
30583079
template: `
30593080
<igx-combo #combo [placeholder]="'Location'" [data]='items'
3060-
[filterable]='true' [valueKey]="'field'" [groupKey]="'region'" [width]="'400px'" [allowCustomValues]="true">
3081+
[filterable]='true' [valueKey]="'field'" [groupKey]="'region'" [width]="'400px'"
3082+
(onSelectionChange)="onSelectionChange($event)" [allowCustomValues]="true">
30613083
<ng-template #itemTemplate let-display let-key="valueKey">
30623084
<div class="state-card--simple">
30633085
<span class="small-red-circle"></span>

projects/igniteui-angular/src/lib/combo/combo.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,8 +1065,8 @@ export class IgxComboComponent implements AfterViewInit, ControlValueAccessor, O
10651065
const args: IComboSelectionChangeEventArgs = { oldSelection, newSelection };
10661066
this.onSelectionChange.emit(args);
10671067
newSelectionAsSet = new Set();
1068-
for (let i = 0; i < newSelection.length; i++) {
1069-
newSelectionAsSet.add(newSelection[i]);
1068+
for (let i = 0; i < args.newSelection.length; i++) {
1069+
newSelectionAsSet.add(args.newSelection[i]);
10701070
}
10711071
this.selectionAPI.set_selection(this.id, newSelectionAsSet);
10721072
this.value = this.dataType !== DataTypes.PRIMITIVE ?

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@
240240
@extend %igx-grid__group-expand-btn !optional;
241241
}
242242

243+
@include e(filtering-outlet) {
244+
@extend %igx-grid__filtering-outlet !optional;
245+
}
246+
243247
@for $i from 1 through 10 {
244248
@include e(row-indentation, $m: level-#{$i}) {
245249
@extend %igx-grid__row-indentation--level-#{$i} !optional;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,4 +1295,8 @@
12951295
padding-left: #{$i*map-get($grid-grouping-indicator-padding, 'compact')};
12961296
}
12971297
}
1298+
1299+
%igx-grid__filtering-outlet {
1300+
z-index: 99999;
1301+
}
12981302
}

projects/igniteui-angular/src/lib/core/styles/components/list/_list-theme.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@
9898
$list-empty-padding: em(16px, 16px);
9999

100100
%igx-list {
101+
position: relative;
101102
display: flex;
102103
flex-flow: column nowrap;
103104
background-color: --var($theme, 'background');
104105
height: 100%;
105106
overflow: hidden;
107+
z-index: 0;
106108
}
107109

108110
%igx-list-empty {

projects/igniteui-angular/src/lib/directives/dragdrop/dragdrop.directive.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { Component, DebugElement } from '@angular/core';
2-
import { async, discardPeriodicTasks, fakeAsync, TestBed, tick } from '@angular/core/testing';
2+
import { async, TestBed } from '@angular/core/testing';
33
import { FormsModule } from '@angular/forms';
44
import { By } from '@angular/platform-browser';
5-
import { IgxAvatarComponent, IgxAvatarModule } from '../../avatar/avatar.component';
6-
import { IgxDragDropModule, RestrictDrag } from './dragdrop.directive';
5+
import { IgxDragDropModule } from './dragdrop.directive';
76

87
describe('IgxDrag', () => {
98

@@ -13,7 +12,6 @@ describe('IgxDrag', () => {
1312
],
1413
imports: [
1514
FormsModule,
16-
IgxAvatarModule,
1715
IgxDragDropModule
1816
]
1917
})

0 commit comments

Comments
 (0)