fix(AutoFill): support enter when set OnCustomeFilter callback (#4015)

This commit is contained in:
Argo Zhang 2024-08-10 12:30:18 +08:00 committed by GitHub
parent 573e1f45b8
commit 5d5624b696
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -244,7 +244,7 @@ public partial class AutoFill<TValue>
}
else if (key == "Enter")
{
ActiveSelectedItem ??= FindItem().FirstOrDefault();
ActiveSelectedItem ??= _filterItems.FirstOrDefault();
if (ActiveSelectedItem != null)
{
_inputString = OnGetDisplayText(ActiveSelectedItem);