Skip to content

Commit f72591b

Browse files
authored
Merge branch '18.0.x' into bpachilova/comboIdChangeInTemplate-fix-14305-18.0.x
2 parents bb5d22a + 71057de commit f72591b

File tree

5 files changed

+53
-6
lines changed

5 files changed

+53
-6
lines changed

projects/igniteui-angular/src/lib/core/styles/components/icon-button/_icon-button-theme.scss

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use 'sass:map';
2+
@use 'sass:meta';
23
@use 'sass:color';
34
@use '../../base' as *;
45
@use '../../themes/schemas' as *;

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
386386
this._superCompactMode = value;
387387
}
388388

389+
/** @hidden @internal */
389390
public override get gridSize() {
390391
if (this.superCompactMode) {
391392
return Size.Small;

projects/igniteui-angular/src/lib/services/exporter-common/base-export-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ export abstract class IgxBaseExporter {
12751275
return result;
12761276
}
12771277

1278-
public addPivotRowHeaders(grid: any) {
1278+
private addPivotRowHeaders(grid: any) {
12791279
if (grid?.pivotUI?.showRowHeaders) {
12801280
const headersList = this._ownersMap.get(DEFAULT_OWNER);
12811281
const enabledRows = grid.pivotConfiguration.rows.filter(r => r.enabled).map((r, index) => ({ name: r.displayName || r.memberName, level: index }));
@@ -1298,7 +1298,7 @@ export abstract class IgxBaseExporter {
12981298
}
12991299
}
13001300

1301-
public addPivotGridColumns(grid: any) {
1301+
private addPivotGridColumns(grid: any) {
13021302
if (grid.nativeElement.tagName.toLowerCase() !== 'igx-pivot-grid') {
13031303
return;
13041304
}

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

+46
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,52 @@ describe('IgxSimpleCombo', () => {
16881688

16891689
expect(comboInput.nativeElement.value).toEqual('Connecticut');
16901690
});
1691+
1692+
it('should properly filter dropdown when a key is pressed while the combo is focused but not opened, with no selected item', fakeAsync(() => {
1693+
expect(combo.collapsed).toEqual(true);
1694+
1695+
// filter with a specific character when there is no selected item
1696+
combo.handleInputChange('z');
1697+
tick();
1698+
fixture.detectChanges();
1699+
1700+
expect(combo.filteredData.length).toEqual(1);
1701+
expect(combo.filteredData[0].field).toEqual('Arizona');
1702+
1703+
combo.close();
1704+
tick();
1705+
fixture.detectChanges();
1706+
1707+
expect(combo.collapsed).toEqual(true);
1708+
1709+
// filter with ' ' when there is no selected item
1710+
combo.handleInputChange(' ');
1711+
tick();
1712+
fixture.detectChanges();
1713+
1714+
expect(combo.filteredData.length).toEqual(12);
1715+
}));
1716+
1717+
it('should properly filter dropdown when a key is pressed while the combo is focused but not opened, with a selected item', fakeAsync(() => {
1718+
// select an item
1719+
combo.select('Connecticut');
1720+
tick();
1721+
fixture.detectChanges();
1722+
1723+
expect(combo.selection.field).toEqual('Connecticut');
1724+
1725+
combo.close();
1726+
tick();
1727+
fixture.detectChanges();
1728+
1729+
// filter with a specific character when there is a selected item
1730+
combo.handleInputChange('z');
1731+
tick();
1732+
fixture.detectChanges();
1733+
1734+
expect(combo.filteredData.length).toEqual(1);
1735+
expect(combo.filteredData[0].field).toEqual('Arizona');
1736+
}));
16911737
});
16921738

16931739
describe('Display density', () => {

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
239239
this.filterValue = this.searchValue = this.comboInput.value;
240240
return;
241241
}
242-
this.filterValue = this.searchValue = '';
243242
});
244243
this.dropdown.opened.pipe(takeUntil(this.destroy$)).subscribe(() => {
245244
if (this.composing) {
@@ -279,12 +278,12 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
279278

280279
/** @hidden @internal */
281280
public override handleInputChange(event?: any): void {
282-
if (event !== undefined) {
283-
this.filterValue = this.searchValue = typeof event === 'string' ? event : event.target.value;
284-
}
285281
if (this.collapsed && this.comboInput.focused) {
286282
this.open();
287283
}
284+
if (event !== undefined) {
285+
this.filterValue = this.searchValue = typeof event === 'string' ? event : event.target.value;
286+
}
288287
if (!this.comboInput.value.trim() && super.selection.length) {
289288
// handle clearing of input by space
290289
this.clearSelection();

0 commit comments

Comments
 (0)