Skip to content

Commit 5656b1e

Browse files
authored
Merge branch 'master' into simeonoff/fix-7455
2 parents 392961f + cb1440a commit 5656b1e

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
aria-autocomplete="both" [attr.aria-owns]="dropdown.id" [attr.aria-labelledby]="ariaLabelledBy" />
4242
<igx-suffix *ngIf="showSearchCaseIcon">
4343
<igx-icon fontSet="case-sensitive" name="case-sensitive" [isActive]="filteringOptions.caseSensitive"
44-
(click)="filteringOptions.caseSensitive=!filteringOptions.caseSensitive">
44+
(click)="toggleCaseSensitive()">
4545
</igx-icon>
4646
</igx-suffix>
4747
</igx-input-group>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,22 +2005,22 @@ describe('igxCombo', () => {
20052005
combo.searchValue = 'New ';
20062006
combo.handleInputChange();
20072007
fixture.detectChanges();
2008-
expect(filterSpy).toHaveBeenCalledTimes(2);
2008+
expect(filterSpy).toHaveBeenCalledTimes(1);
20092009
expect(combo.filteredData.length).toBeLessThan(initialData.length);
20102010

20112011
firstFilter = [...combo.filteredData];
20122012
combo.searchValue += ' ';
20132013
combo.handleInputChange();
20142014
fixture.detectChanges();
20152015
expect(combo.filteredData.length).toBeLessThan(initialData.length);
2016-
expect(filterSpy).toHaveBeenCalledTimes(4);
2016+
expect(filterSpy).toHaveBeenCalledTimes(2);
20172017

20182018
combo.searchValue = '';
20192019
combo.handleInputChange();
20202020
fixture.detectChanges();
20212021
expect(combo.filteredData.length).toEqual(initialData.length);
20222022
expect(combo.filteredData.length).toBeGreaterThan(firstFilter.length);
2023-
expect(filterSpy).toHaveBeenCalledTimes(6);
2023+
expect(filterSpy).toHaveBeenCalledTimes(3);
20242024
expect(combo.filteredData.length).toEqual(initialData.length);
20252025
});
20262026
it('should properly select/deselect filteredData', () => {
@@ -2033,7 +2033,7 @@ describe('igxCombo', () => {
20332033
combo.searchValue = 'New ';
20342034
combo.handleInputChange();
20352035
fixture.detectChanges();
2036-
expect(filterSpy).toHaveBeenCalledTimes(2);
2036+
expect(filterSpy).toHaveBeenCalledTimes(1);
20372037
expect(combo.filteredData.length).toBeLessThan(initialData.length);
20382038
expect(combo.filteredData.length).toEqual(4);
20392039

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,13 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
15781578
public handleClosed() {
15791579
this.onClosed.emit();
15801580
}
1581+
1582+
/**
1583+
* @hidden @internal
1584+
*/
1585+
public toggleCaseSensitive() {
1586+
this.filteringOptions = { caseSensitive: !this.filteringOptions.caseSensitive };
1587+
}
15811588
}
15821589

15831590
/**

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { IComboFilteringOptions } from './combo.component';
1111
* @hidden
1212
*/
1313
@Pipe({
14-
name: 'comboFiltering',
15-
pure: false
14+
name: 'comboFiltering'
1615
})
1716
export class IgxComboFilteringPipe implements PipeTransform {
1817
public transform(collection: any[], searchValue: any, displayKey: any,

0 commit comments

Comments
 (0)