Looking to implement a customized Autocomplete feature.
As the user begins typing, a small window should appear with selectable options. I want users to have the ability to navigate and select an option using their keyboard.
For instance: - User types "Hou" - Available options are shown as ["House", "Houston"] - User presses the down arrow key on the keyboard and then hits enter to choose "house"
This is my custom scroll component for the pop-up:
<ul class="plDropdown-optionList">
<cdk-virtual-scroll-viewport style="height: 200px" itemSize="30">
<ng-container *cdkVirtualFor="let option of displayableOptions">
<button class="plDropdown-option" type="button" (click)="selectOption(option)">
{{option}}
</button>
</ng-container>
</cdk-virtual-scroll-viewport>
</ul>