Skip to content

Commit ddff626

Browse files
committed
nit(combobox): changed class names and parameter types.
1 parent 065adf1 commit ddff626

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/cdk-experimental/combobox/combobox.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Combobox', () => {
2929
let comboboxElement: HTMLElement;
3030

3131
let dialog: DebugElement;
32-
let dialogInstance: DialogContent<unknown>;
32+
let dialogInstance: FakeDialogContent<unknown>;
3333
let dialogElement: HTMLElement;
3434

3535
let applyButton: DebugElement;
@@ -38,7 +38,7 @@ describe('Combobox', () => {
3838
beforeEach(async(() => {
3939
TestBed.configureTestingModule({
4040
imports: [CdkComboboxModule],
41-
declarations: [ComboboxToggle, DialogContent],
41+
declarations: [ComboboxToggle, FakeDialogContent],
4242
}).compileComponents();
4343
}));
4444

@@ -73,8 +73,8 @@ describe('Combobox', () => {
7373
dispatchMouseEvent(comboboxElement, 'click');
7474
fixture.detectChanges();
7575

76-
dialog = fixture.debugElement.query(By.directive(DialogContent));
77-
dialogInstance = dialog.injector.get<DialogContent<unknown>>(DialogContent);
76+
dialog = fixture.debugElement.query(By.directive(FakeDialogContent));
77+
dialogInstance = dialog.injector.get<FakeDialogContent<unknown>>(FakeDialogContent);
7878

7979
expect(comboboxElement.getAttribute('aria-owns')).toBe(dialogInstance.dialogId);
8080
expect(comboboxElement.getAttribute('aria-haspopup')).toBe('dialog');
@@ -106,7 +106,7 @@ describe('Combobox', () => {
106106

107107
expect(comboboxInstance.isOpen()).toBeTrue();
108108

109-
dialog = fixture.debugElement.query(By.directive(DialogContent));
109+
dialog = fixture.debugElement.query(By.directive(FakeDialogContent));
110110
dialogElement = dialog.nativeElement;
111111

112112
expect(document.activeElement).toBe(dialogElement);
@@ -191,7 +191,7 @@ describe('Combobox', () => {
191191
beforeEach(async(() => {
192192
TestBed.configureTestingModule({
193193
imports: [CdkComboboxModule],
194-
declarations: [ComboboxToggle, DialogContent],
194+
declarations: [ComboboxToggle, FakeDialogContent],
195195
}).compileComponents();
196196
}));
197197

@@ -262,7 +262,7 @@ describe('Combobox', () => {
262262
beforeEach(async(() => {
263263
TestBed.configureTestingModule({
264264
imports: [CdkComboboxModule],
265-
declarations: [ComboboxToggle, DialogContent],
265+
declarations: [ComboboxToggle, FakeDialogContent],
266266
}).compileComponents();
267267
}));
268268

@@ -405,7 +405,7 @@ let id = 0;
405405
'tabIndex': '-1'
406406
}
407407
})
408-
export class DialogContent<V> implements OnInit {
408+
export class FakeDialogContent<V> implements OnInit {
409409

410410
dialogId = `dialog-${id++}`;
411411
role = 'dialog';

src/cdk-experimental/combobox/combobox.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const allowedOpenActions = ['focus', 'click', 'downKey', 'toggle'];
4343
'class': 'cdk-combobox',
4444
'(click)': '_handleInteractions("click")',
4545
'(focus)': '_handleInteractions("focus")',
46-
'(keydown)': 'keydown($event)',
46+
'(keydown)': '_keydown($event)',
4747
'(document:click)': '_attemptClose($event)',
4848
'[attr.aria-disabled]': 'disabled',
4949
'[attr.aria-owns]': 'contentId',
@@ -112,7 +112,7 @@ export class CdkCombobox<T = unknown> implements OnDestroy, AfterContentInit {
112112
this.panelValueChanged.complete();
113113
}
114114

115-
keydown(event: KeyboardEvent) {
115+
_keydown(event: KeyboardEvent) {
116116
const {keyCode} = event;
117117

118118
if (keyCode === DOWN_ARROW && this._openActions.indexOf('downKey') !== -1) {
@@ -123,7 +123,7 @@ export class CdkCombobox<T = unknown> implements OnDestroy, AfterContentInit {
123123
}
124124
}
125125

126-
_handleInteractions(interaction: string) {
126+
_handleInteractions(interaction: OpenAction) {
127127
if (interaction === 'click') {
128128
if (this._openActions.indexOf('toggle') !== -1) {
129129
this.toggle();

0 commit comments

Comments
 (0)