-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Pourchel
committed
Feb 2, 2024
1 parent
5c3ba9e
commit 5559682
Showing
5 changed files
with
33 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 8 additions & 19 deletions
27
projects/ngx-cream-lib/src/lib/autocomplete/autocomplete.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,24 @@ | ||
<label for="b1-input">{{ label }}</label> | ||
<div class="box box-list" (focusout)="close()" (keydown)="escClose($event)"> | ||
<div class="box box-list" (keydown)="escClose($event)" (focusout)="close()"> | ||
<div class="group"> | ||
<input | ||
#acInput | ||
id="b1-input" | ||
class="b_edit" | ||
type="text" | ||
role="combobox" | ||
(focus)="toggleOpen()" | ||
(keypress.escape)="close()" | ||
(focus)="open()" | ||
(click)="onChange($event)" | ||
(keyup)="onChange($event)" | ||
aria-autocomplete="countries" | ||
aria-autocomplete="values" | ||
[attr.aria-expanded]="isOpen" | ||
aria-controls="b1-listbox" /> | ||
<button | ||
id="b1-button" | ||
tabindex="-1" | ||
aria-label="Regions" | ||
[attr.aria-expanded]="isOpen" | ||
(click)="toggleOpen()" | ||
(close)="close()" | ||
aria-controls="b1-listbox"> | ||
<svg width="18" height="16" aria-hidden="true" focusable="false" style="forced-color-adjust: auto"> | ||
<polygon class="arrow" stroke-width="0" fill-opacity="0.75" fill="currentcolor" points="3,6 15,6 9,14"></polygon> | ||
</svg> | ||
</button> | ||
|
||
<ul id="b1-listbox" role="listbox" [hidden]="!isOpen" aria-label="Regions"> | ||
<p> | ||
<li *ngFor="let li of filteredCountriesList">{{ li }}</li> | ||
</p> | ||
<ul id="b1-listbox" role="listbox" [hidden]="!isOpen" aria-label="Values"> | ||
<li *ngFor="let li of filteredList" (click)="getSelectedValue(li)"> | ||
{{ li }} | ||
</li> | ||
</ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters