Dropdown Filter Customization

How to implement search box inside a dropdown popup with a clear icon as shown below:
Dropdown

Currently its been implemented using Header Template, but the keydown event seems to not work as expected in the usecase: If 'A' was selected and user tries to search 'B' then the keydown doesnt move the focus to the items.

There is a built-in search in the DropDown component:

Yes, I want to add a clear icon for the search box, and the search box thats implemented doesnt provide that option. Its possible through HeaderTemplate, but then it doesnt work as expected when it comes to keyboard interaction