Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Yomodo committed Oct 20, 2023
1 parent 80419bf commit 582fb24
Showing 1 changed file with 7 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -896,28 +896,16 @@ protected internal async void HandleKeyUp(KeyboardEventArgs obj)

protected internal async Task HandleOnBlur(FocusEventArgs obj)
{

if (Strict == false)
if (Strict)
{
await UpdateComboBoxValueAsync(Converter.Get(_searchString), updateText: true, updateSearchString: true);
var foundItem = Items.FirstOrDefault(x => Converter.Set(x.Value).Equals(_searchString, StringComparison.OrdinalIgnoreCase));
if (foundItem is not null)
await ToggleOption(foundItem, true);
else
await Clear();
}
else
{
if (Items.Select(x => x.Value).Contains(Converter.Get(_searchString)) == false)
{
if (Items.Select(x => x.Value).Contains(Value))
{
await ToggleOption(Items.FirstOrDefault(x => x.Value.Equals(Value)), true);
}
else
{
await Clear();
}

//_searchString = Text;
}
}

await UpdateComboBoxValueAsync(Converter.Get(_searchString), updateText: true, updateSearchString: true);

await OnBlurredAsync(obj);
}
Expand Down

0 comments on commit 582fb24

Please sign in to comment.