Skip to content

Commit c9ff811

Browse files
committed
feat: add a component selector to the dropdown menu
Closes #8
1 parent cb1e5fe commit c9ff811

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/text-input-autocomplete-menu.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Component, ElementRef, HostListener, ViewChild } from '@angular/core';
22
import { Subject } from 'rxjs';
33

44
@Component({
5+
selector: 'mwl-text-input-autocomplete-menu',
56
template: `
67
<ul
78
*ngIf="choices?.length > 0"

test/text-input-autocomplete.directive.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,4 +374,14 @@ describe('text-input-autocomplete directive', () => {
374374
expect(() => arrowDown(CustomMenuComponent)).not.to.throw();
375375
})
376376
);
377+
378+
it(
379+
'should add a component selector to the menu for global styling',
380+
fakeAsync(() => {
381+
typeInTextarea('test @');
382+
expect(getMenu().nativeElement.tagName.toLowerCase()).to.equal(
383+
'mwl-text-input-autocomplete-menu'
384+
);
385+
})
386+
);
377387
});

0 commit comments

Comments
 (0)