Skip to content

Mass Merging 20.0.x to master #16059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 50 commits into from
Jul 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
64905bf
feat(combo): close dropdown on 'Tab'
MonikaKirkova Jun 3, 2025
23565da
feat(combo): make 'clear selection' button focusable
MonikaKirkova Jun 3, 2025
081b0db
fix(dropdown): Preventing aria-label to defualt to id
Jun 3, 2025
21f05db
feat(combo): make toggle button focusable and add aria label
MonikaKirkova Jun 9, 2025
832ebfb
chore(*): fix failing test
MonikaKirkova Jun 9, 2025
8840d2e
fix(i18n): add localization for the aria label
MonikaKirkova Jul 3, 2025
ff896e6
Merge branch '20.0.x' into mkirkova/feat-combo-toggle-button-20.x
MonikaKirkova Jul 3, 2025
a39b7b4
fix(grid): Preventing rangeSelection from element inside cellTemplate
Jul 4, 2025
49af236
Merge branch '20.0.x' into ikitanov/fix-15839
IvanKitanov17 Jul 11, 2025
ea77a9e
Merge branch '20.0.x' of https://github.com/IgniteUI/igniteui-angular…
MonikaKirkova Jul 11, 2025
f8efc1d
Merge branch '20.0.x' into mkirkova/feat-combo-close-on-blur-15838-ma…
ChronosSF Jul 14, 2025
7450678
Merge branch '20.0.x' of https://github.com/IgniteUI/igniteui-angular…
MonikaKirkova Jul 14, 2025
7b192fe
Merge branch '20.0.x' into ikitanov/fix#15810-20.0.x
kacheshmarova Jul 15, 2025
46add5c
Merge branch '20.0.x' of https://github.com/IgniteUI/igniteui-angular…
MonikaKirkova Jul 15, 2025
d2ce710
Merge branch '20.0.x' into mkirkova/feat-combo-clear-selection-15841-…
ChronosSF Jul 18, 2025
b2d0fa5
Merge pull request #15874 from IgniteUI/mkirkova/feat-combo-clear-sel…
ChronosSF Jul 18, 2025
f18ce4e
fix(ci): fixing codeql execution rules
ChronosSF Jul 18, 2025
94bd3b3
Merge pull request #16060 from IgniteUI/sstoychev/fix-codeql
ChronosSF Jul 18, 2025
c588764
fix(ci): changing loc dir so that it's correct.
ChronosSF Jul 18, 2025
eb86e1e
Merge branch '20.0.x' into mkirkova/feat-combo-close-on-blur-15838-ma…
kacheshmarova Jul 21, 2025
47880a1
Merge branch '20.0.x' of https://github.com/IgniteUI/igniteui-angular…
MonikaKirkova Jul 21, 2025
72edb95
Merge pull request #16061 from IgniteUI/sstoychev/fix-sassdoc-loc
ChronosSF Jul 21, 2025
26b66df
Merge branch '20.0.x' into mkirkova/feat-combo-toggle-button-20.x
ChronosSF Jul 21, 2025
df8004e
Merge pull request #15921 from IgniteUI/mkirkova/feat-combo-toggle-bu…
ChronosSF Jul 21, 2025
0cc5dc5
Merge branch '20.0.x' into ikitanov/fix-15839
ChronosSF Jul 21, 2025
8d6e54d
Merge branch '20.0.x' into mkirkova/feat-combo-close-on-blur-15838-ma…
kacheshmarova Jul 22, 2025
ea24646
Merge pull request #15872 from IgniteUI/mkirkova/feat-combo-close-on-…
kacheshmarova Jul 22, 2025
a608f72
feat(dropdown): adding activedescendants to toggles for screen readers
ChronosSF Jul 22, 2025
3efa9f5
Adding activedescendants to toggles for screen readers
IvanKitanov17 Jul 22, 2025
ac30d52
Merge branch '20.0.x' into ikitanov/fix-15839
IvanKitanov17 Jul 22, 2025
a65e95f
chore(dropdown): Adding test for active descendant
Jul 22, 2025
78ad0c1
chore(combo): Fixing aria-activedescendant test
Jul 23, 2025
d28216d
Merge branch '20.0.x' into ikitanov/fix#15810-20.0.x
kacheshmarova Jul 23, 2025
0c1ad42
refactor(input-group): update file upload style implementation (#16003)
desig9stein Jul 23, 2025
282111c
Merge branch '20.0.x' into ikitanov/fix#15810-20.0.x
ddaribo Jul 23, 2025
8cdf9ea
chore(grid): Unifying test sample and updating test
Jul 23, 2025
6b70efe
chore(grid): Fixing formatting
IvanKitanov17 Jul 23, 2025
548f406
chore(grid): Replacing dispatch event with UiInteractions
IvanKitanov17 Jul 23, 2025
de5530b
chore(grid): Adding check for hierrchical grid
Jul 24, 2025
278901c
chore(grids): Adding tests for tGrid and hGrid
Jul 24, 2025
a617681
chore(grid): Adressing comments
Jul 25, 2025
185b87c
Merge pull request #16025 from IgniteUI/ikitanov/fix#15810-20.0.x
kacheshmarova Jul 25, 2025
f02e0a0
Handle validation for fields with '.' - 20.0.x (#16054)
MonikaKirkova Jul 25, 2025
1504a5f
Merge branch '20.0.x' into ikitanov/fix-15839
kacheshmarova Jul 28, 2025
4d0a023
feat(themes): export component themes from angular to theming (#16027)
didimmova Jul 28, 2025
240dc45
fix(date-picker): indigo elevation (#16078)
SisIvanova Jul 28, 2025
7747cc1
Merge branch '20.0.x' into ikitanov/fix-15839
Lipata Jul 28, 2025
a9d8f8c
deps(theming): bump to latest version (#16079)
simeonoff Jul 28, 2025
fd19a92
Merge branch '20.0.x' into ikitanov/fix-15839
ChronosSF Jul 28, 2025
bbb547c
Merge pull request #15879 from IgniteUI/ikitanov/fix-15839
ChronosSF Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master, 19.2.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
branches: [ master, '[0-9]+.[0-9]+.x' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, 19.2.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
branches: [ master, '[0-9]+.[0-9]+.x' ]
schedule:
- cron: '33 4 * * 4'

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"@types/source-map": "0.5.2",
"express": "^5.1.0",
"fflate": "^0.8.1",
"igniteui-theming": "^19.1.2",
"igniteui-theming": "^19.2.1",
"igniteui-trial-watermark": "^3.1.0",
"lodash-es": "^4.17.21",
"rxjs": "^7.8.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsBG = {
igx_combo_empty_message: 'Списъкът е празен',
igx_combo_filter_search_placeholder: 'Въведете термин за търсене',
igx_combo_addCustomValues_placeholder: 'Добавяне на елемент',
igx_combo_clearItems_placeholder: 'Изчистване на избора'
igx_combo_clearItems_placeholder: 'Изчистване на избора',
igx_combo_aria_label_options: 'Има избрани опции',
igx_combo_aria_label_no_options: 'Няма избрани опции'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsCS = {
igx_combo_empty_message: 'Seznam je prázdný',
igx_combo_filter_search_placeholder: 'Zadejte hledaný výraz',
igx_combo_addCustomValues_placeholder: 'Přidat položku',
igx_combo_clearItems_placeholder: 'Vymazat výběr'
igx_combo_clearItems_placeholder: 'Vymazat výběr',
igx_combo_aria_label_options: 'Vybrané možnosti',
igx_combo_aria_label_no_options: 'Žádné možnosti nejsou vybrány'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsDA = {
igx_combo_empty_message: 'Listen er tom',
igx_combo_filter_search_placeholder: 'Indtast en søgeterm',
igx_combo_addCustomValues_placeholder: 'Tilføj element',
igx_combo_clearItems_placeholder: 'Ryd markering'
igx_combo_clearItems_placeholder: 'Ryd markering',
igx_combo_aria_label_options: 'Valgte muligheder',
igx_combo_aria_label_no_options: 'Ingen valgte muligheder'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsDE = {
igx_combo_empty_message: 'Die Liste ist leer',
igx_combo_filter_search_placeholder: 'Suchbegriff eingeben',
igx_combo_addCustomValues_placeholder: 'Element hinzufügen',
igx_combo_clearItems_placeholder: 'Auswahl löschen'
igx_combo_clearItems_placeholder: 'Auswahl löschen',
igx_combo_aria_label_options: 'Ausgewählte Optionen',
igx_combo_aria_label_no_options: 'Keine Optionen ausgewählt'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsES = {
igx_combo_empty_message: 'La lista está vacía',
igx_combo_filter_search_placeholder: 'Escriba un término de búsqueda',
igx_combo_addCustomValues_placeholder: 'Agregar elemento',
igx_combo_clearItems_placeholder: 'Borrar selección'
igx_combo_clearItems_placeholder: 'Borrar selección',
igx_combo_aria_label_options: 'Opciones seleccionadas',
igx_combo_aria_label_no_options: 'No hay opciones seleccionadas'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsFR = {
igx_combo_empty_message: 'La liste est vide',
igx_combo_filter_search_placeholder: 'Entrez un terme de recherche',
igx_combo_addCustomValues_placeholder: 'Ajouter un élément',
igx_combo_clearItems_placeholder: 'Effacer la sélection'
igx_combo_clearItems_placeholder: 'Effacer la sélection',
igx_combo_aria_label_options: 'Options sélectionnées',
igx_combo_aria_label_no_options: 'Aucune option sélectionnée'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsHU = {
igx_combo_empty_message: 'Üres a lista',
igx_combo_filter_search_placeholder: 'Írjon be egy keresési kifejezést',
igx_combo_addCustomValues_placeholder: 'Elem hozzáadása',
igx_combo_clearItems_placeholder: 'Kiválasztás törlése'
igx_combo_clearItems_placeholder: 'Kiválasztás törlése',
igx_combo_aria_label_options: 'Kiválasztott lehetőségek',
igx_combo_aria_label_no_options: 'Nincsenek kiválasztott lehetőségek'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsIT = {
igx_combo_empty_message: 'L\'elenco è vuoto',
igx_combo_filter_search_placeholder: 'Immettere il testo di ricerca',
igx_combo_addCustomValues_placeholder: 'Aggiungi elemento',
igx_combo_clearItems_placeholder: 'Cancella selezione'
igx_combo_clearItems_placeholder: 'Cancella selezione',
igx_combo_aria_label_options: 'Opzioni selezionate',
igx_combo_aria_label_no_options: 'Nessuna opzione selezionata'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsJA = {
igx_combo_empty_message: 'リストが空です',
igx_combo_filter_search_placeholder: '検索条件の入力',
igx_combo_addCustomValues_placeholder: '項目の追加',
igx_combo_clearItems_placeholder: '選択のクリア'
igx_combo_clearItems_placeholder: '選択のクリア',
igx_combo_aria_label_options: '選択されたオプション',
igx_combo_aria_label_no_options: '選択されたオプションはありません'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsKO = {
igx_combo_empty_message: '목록이 비어 있음',
igx_combo_filter_search_placeholder: '검색어 입력',
igx_combo_addCustomValues_placeholder: '항목 추가',
igx_combo_clearItems_placeholder: '선택 지우기'
igx_combo_clearItems_placeholder: '선택 지우기',
igx_combo_aria_label_options: '선택된 옵션',
igx_combo_aria_label_no_options: '선택된 옵션 없음'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsNB = {
igx_combo_empty_message: 'Listen er tom',
igx_combo_filter_search_placeholder: 'Skriv inn søkeord',
igx_combo_addCustomValues_placeholder: 'Legg til element',
igx_combo_clearItems_placeholder: 'Fjern valg'
igx_combo_clearItems_placeholder: 'Fjern valg',
igx_combo_aria_label_options: 'Valgte alternativer',
igx_combo_aria_label_no_options: 'Ingen valgte alternativer'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsNL = {
igx_combo_empty_message: 'De lijst is leeg',
igx_combo_filter_search_placeholder: 'Typ een zoekterm',
igx_combo_addCustomValues_placeholder: 'Item toevoegen',
igx_combo_clearItems_placeholder: 'Selectie wissen'
igx_combo_clearItems_placeholder: 'Selectie wissen',
igx_combo_aria_label_options: 'Geselecteerde opties',
igx_combo_aria_label_no_options: 'Geen geselecteerde opties'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsPL = {
igx_combo_empty_message: 'Lista jest pusta',
igx_combo_filter_search_placeholder: 'Wprowadź tekst wyszukiwania',
igx_combo_addCustomValues_placeholder: 'Dodaj element',
igx_combo_clearItems_placeholder: 'Wyczyść wybór'
igx_combo_clearItems_placeholder: 'Wyczyść wybór',
igx_combo_aria_label_options: 'Wybrane opcje',
igx_combo_aria_label_no_options: 'Brak wybranych opcji'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsPT = {
igx_combo_empty_message: 'A lista está vazia',
igx_combo_filter_search_placeholder: 'Digite um termo de pesquisa',
igx_combo_addCustomValues_placeholder: 'Adicionar item',
igx_combo_clearItems_placeholder: 'Limpar seleção'
igx_combo_clearItems_placeholder: 'Limpar seleção',
igx_combo_aria_label_options: 'Opções selecionadas',
igx_combo_aria_label_no_options: 'Nenhuma opção selecionada'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsRO = {
igx_combo_empty_message: 'Lista este goală',
igx_combo_filter_search_placeholder: 'Introduceți termenul de căutare',
igx_combo_addCustomValues_placeholder: 'Adăugați element',
igx_combo_clearItems_placeholder: 'Ștergeți selecția'
igx_combo_clearItems_placeholder: 'Ștergeți selecția',
igx_combo_aria_label_options: 'Opțiuni selectate',
igx_combo_aria_label_no_options: 'Nicio opțiune selectată'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsSV = {
igx_combo_empty_message: 'Listan är tom',
igx_combo_filter_search_placeholder: 'Ange sökterm',
igx_combo_addCustomValues_placeholder: 'Lägg till objekt',
igx_combo_clearItems_placeholder: 'Rensa urval'
igx_combo_clearItems_placeholder: 'Rensa urval',
igx_combo_aria_label_options: 'Valda alternativ',
igx_combo_aria_label_no_options: 'Inga valda alternativ'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsTR = {
igx_combo_empty_message: 'Liste boş',
igx_combo_filter_search_placeholder: 'Arama terimi girin',
igx_combo_addCustomValues_placeholder: 'Öğe ekle',
igx_combo_clearItems_placeholder: 'Seçimi temizle'
igx_combo_clearItems_placeholder: 'Seçimi temizle',
igx_combo_aria_label_options: 'Seçilen seçenekler',
igx_combo_aria_label_no_options: 'Seçilen seçenek yok'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsZHHANS = {
igx_combo_empty_message: '列表为空',
igx_combo_filter_search_placeholder: '输入搜索字符串',
igx_combo_addCustomValues_placeholder: '添加项目',
igx_combo_clearItems_placeholder: '清除选择'
igx_combo_clearItems_placeholder: '清除选择',
igx_combo_aria_label_options: '选定的选项',
igx_combo_aria_label_no_options: '没有选定的选项'
} satisfies MakeRequired<IComboResourceStrings>;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ export const ComboResourceStringsZHHANT = {
igx_combo_empty_message: '清單是空的',
igx_combo_filter_search_placeholder: '輸入搜尋字串',
igx_combo_addCustomValues_placeholder: '新增項目',
igx_combo_clearItems_placeholder: '清除選擇'
igx_combo_clearItems_placeholder: '清除選擇',
igx_combo_aria_label_options: '已選擇的選項',
igx_combo_aria_label_no_options: '沒有已選擇的選項'
} satisfies MakeRequired<IComboResourceStrings>;
2 changes: 1 addition & 1 deletion projects/igniteui-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"tslib": "^2.3.0",
"igniteui-trial-watermark": "^3.1.0",
"lodash-es": "^4.17.21",
"igniteui-theming": "^19.1.2",
"igniteui-theming": "^19.2.1",
"@igniteui/material-icons-extended": "^3.1.0"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
this.handleSpace();
break;
case DropDownActionKey.ESCAPE:
case DropDownActionKey.TAB:
this.close();
}
}
Expand Down
14 changes: 14 additions & 0 deletions projects/igniteui-angular/src/lib/combo/combo.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,20 @@ export abstract class IgxComboBaseDirective implements IgxComboBase, AfterViewCh
}
}

/** @hidden @internal */
public handleToggleKeyDown(eventArgs: KeyboardEvent) {
if (eventArgs.key === 'Enter' || eventArgs.key === ' ') {
eventArgs.preventDefault();
this.toggle();
}
}

/** @hidden @internal */
public getAriaLabel(): string {
return this.displayValue ? this.resourceStrings.igx_combo_aria_label_options : this.resourceStrings.igx_combo_aria_label_no_options;
}


/** @hidden @internal */
public registerOnChange(fn: any): void {
this._onChangeCallback = fn;
Expand Down
5 changes: 3 additions & 2 deletions projects/igniteui-angular/src/lib/combo/combo.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
role="combobox" aria-haspopup="listbox"
[attr.aria-expanded]="!dropdown.collapsed" [attr.aria-controls]="dropdown.listId"
[attr.aria-labelledby]="ariaLabelledBy || label?.id || placeholder"
[attr.aria-label]="getAriaLabel()"
(blur)="onBlur()" />
<ng-container ngProjectAs="igx-suffix">
<ng-content select="igx-suffix,[igxSuffix]"></ng-content>
</ng-container>
@if (displayValue) {
<igx-suffix [attr.aria-label]="resourceStrings.igx_combo_clearItems_placeholder" class="igx-combo__clear-button"
(click)="handleClearItems($event)">
(click)="handleClearItems($event)" (keydown)="handleClearKeyDown($event)" [tabindex]="disabled ? -1 : 0" role="button">
@if (clearIconTemplate) {
<ng-container *ngTemplateOutlet="clearIconTemplate"></ng-container>
}
Expand All @@ -28,7 +29,7 @@
}
</igx-suffix>
}
<igx-suffix class="igx-combo__toggle-button">
<igx-suffix class="igx-combo__toggle-button" (keydown)="handleToggleKeyDown($event)" [tabindex]="disabled ? -1 : 0" role="button">
@if (toggleIconTemplate) {
<ng-container *ngTemplateOutlet="toggleIconTemplate; context: {$implicit: collapsed}"></ng-container>
}
Expand Down
48 changes: 47 additions & 1 deletion projects/igniteui-angular/src/lib/combo/combo.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ describe('igxCombo', () => {
expect(input.nativeElement.getAttribute('aria-expanded')).toMatch('false');
expect(input.nativeElement.getAttribute('aria-controls')).toEqual(combo.dropdown.listId);
expect(input.nativeElement.getAttribute('aria-labelledby')).toEqual(combo.placeholder);
expect(input.nativeElement.getAttribute('aria-label')).toEqual('No options selected');

const dropdown = fixture.debugElement.query(By.css(`div[role="listbox"]`));
expect(dropdown.nativeElement.getAttribute('aria-labelledby')).toEqual(combo.placeholder);
Expand All @@ -1073,12 +1074,16 @@ describe('igxCombo', () => {

const list = fixture.debugElement.query(By.css(`.${CSS_CLASS_CONTENT}`));
expect(list.nativeElement.getAttribute('aria-multiselectable')).toEqual('true');
expect(list.nativeElement.getAttribute('aria-activedescendant')).toEqual('');
expect(list.nativeElement.getAttribute('aria-activedescendant')).toEqual(null);

UIInteractions.triggerEventHandlerKeyDown('ArrowDown', list);
tick();
fixture.detectChanges();
expect(list.nativeElement.getAttribute('aria-activedescendant')).toEqual(combo.dropdown.focusedItem.id);

combo.select(['Illinois', 'Mississippi', 'Ohio']);
fixture.detectChanges();
expect(input.nativeElement.getAttribute('aria-label')).toEqual('Selected options');
}));
it('should render aria-expanded attribute properly', fakeAsync(() => {
expect(input.nativeElement.getAttribute('aria-expanded')).toMatch('false');
Expand Down Expand Up @@ -1938,6 +1943,16 @@ describe('igxCombo', () => {
fixture.detectChanges();
expect(firstVisibleItem.classList.contains(CSS_CLASS_FOCUSED)).toBeTruthy();
}));
it('should close the dropdown list on pressing Tab key', fakeAsync(() => {
combo.toggle();
fixture.detectChanges();

const dropdownContent = fixture.debugElement.query(By.css(`.${CSS_CLASS_CONTENT}`));
UIInteractions.triggerEventHandlerKeyDown('Tab', dropdownContent);
tick();
fixture.detectChanges();
expect(combo.collapsed).toBeTruthy();
}));
});
describe('primitive data dropdown: ', () => {
it('should properly navigate with HOME/END keys when no virtScroll is necessary', async () => {
Expand Down Expand Up @@ -2269,6 +2284,37 @@ describe('igxCombo', () => {
cancel: false
});
});
it('should toggle combo dropdown on Enter of the focused toggle icon', fakeAsync(() => {
spyOn(combo, 'toggle').and.callThrough();
const toggleBtn = fixture.debugElement.query(By.css(`.${CSS_CLASS_TOGGLEBUTTON}`));

UIInteractions.triggerEventHandlerKeyDown('Enter', toggleBtn);
tick();
fixture.detectChanges();
expect(combo.toggle).toHaveBeenCalledTimes(1);
expect(combo.collapsed).toEqual(false);

UIInteractions.triggerEventHandlerKeyDown('Enter', toggleBtn);
tick();
fixture.detectChanges();
expect(combo.toggle).toHaveBeenCalledTimes(2);
expect(combo.collapsed).toEqual(true);
}));
it('should clear the selection on Enter of the focused clear icon', () => {
const selectedItem_1 = combo.dropdown.items[1];
combo.toggle();
fixture.detectChanges();
simulateComboItemClick(1);
expect(combo.selection[0]).toEqual(selectedItem_1.value);
expect(combo.value[0]).toEqual(selectedItem_1.value[combo.valueKey]);

const clearBtn = fixture.debugElement.query(By.css(`.${CSS_CLASS_CLEARBUTTON}`));
UIInteractions.triggerEventHandlerKeyDown('Enter', clearBtn);
fixture.detectChanges();
expect(input.nativeElement.value).toEqual('');
expect(combo.selection.length).toEqual(0);
expect(combo.value.length).toEqual(0);
});
it('should not be able to select group header', () => {
spyOn(combo.selectionChanging, 'emit').and.callThrough();
combo.toggle();
Expand Down
25 changes: 21 additions & 4 deletions projects/igniteui-angular/src/lib/combo/combo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,7 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
/**
* @hidden @internal
*/
public handleClearItems(event: Event): void {
if (this.disabled) {
return;
}
public clearInput(event: Event): void {
this.deselectAllItems(true, event);
if (this.collapsed) {
this.getEditElement().focus();
Expand All @@ -278,6 +275,26 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
event.stopPropagation();
}

/**
* @hidden @internal
*/
public handleClearItems(event: Event): void {
if (this.disabled) {
return;
}
this.clearInput(event);
}

/**
* @hidden @internal
*/
public handleClearKeyDown(eventArgs: KeyboardEvent) {
if (eventArgs.key === 'Enter' || eventArgs.key === ' ') {
eventArgs.preventDefault();
this.clearInput(eventArgs);
}
}

/**
* Select defined items
*
Expand Down
Loading
Loading