Blazor Component Authority
.
Generic Autocomplete
I thought I’d take a stab at creating a generic autocomplete Blazor component. While researching I came across the HTML
Datalist
tag to add a list of options to an input element. The combination provided a lot of the functionality I was looking for. Specifically the dropdown filtered by the text in the input. I added some additional code to make the component generic and some validation to ensure what the user enters is on the list. If it isn’t, the user gets a validation error message. I also included the ability to automatically select an option on the list if there is only one remaining after filtering and pressing enter or tab.
I’m pretty happy with the result. You can try it out at the
Blazor Component Authority Demonstration Application
and also take a look at the source code. I hope you find it useful. Thanks for reading.
Michael Bross
Post Navigation
Previous Post:
Free Hosting
Next Post:
Input Helper
Related Posts:
Alert!
December 13, 2022
Michael Bross
Code Available in Demonstration Application
November 1, 2022
Michael Bross
Display Value Component
September 6, 2022
Michael Bross
Sliding Sidebar
Archives
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
Categories
Components
Design
Uncategorized
Search
Search
Recent Posts
Input Events Analyzer
Input Helper
Generic Autocomplete
Free Hosting
Changing History
Recent Comments