Describe the bug
If we type a few letter less than MinimumLength and IsMultiselect is true, we get ArgumentNullException after clearing text by pressing backspace key. This error occurs when the MinimumLength property is set and the search metod is not triggered because of count of letters is not reached MinimumLength yet, and backspace key is used for clearing.
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at Blazored.Typeahead.BlazoredTypeahead`2.HandleKeyup(KeyboardEventArgs args)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Describe the bug If we type a few letter less than
MinimumLength
andIsMultiselect
istrue
, we getArgumentNullException
after clearing text by pressingbackspace
key. This error occurs when theMinimumLength
property is set and the search metod is not triggered because of count of letters is not reachedMinimumLength
yet, andbackspace
key is used for clearing.To Reproduce
Add these to a page
nullable
is enablebackspace
key to delete it.Hosting Model (is this issue happening with a certain hosting model?):
Version: 4.7.0