MudBlazor / MudBlazor

Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
http://mudblazor.com
MIT License
8.03k stars 1.28k forks source link

Autocomplete: Treat all ways of closing overlay the same #8914

Closed danielchalmers closed 5 months ago

danielchalmers commented 5 months ago

Description

Previously if you would click the overlay it would trigger the menu close handler, but not if you tabbed away or set it programmatically. Now we listen to the overlay, so any event that makes that close will call our close handler.

Resolves #3825 Resolves #3824

How Has This Been Tested?

Type of Changes

Before (tabbing away does not coerce but clicking does):

https://github.com/MudBlazor/MudBlazor/assets/7112040/51e0f97e-fb42-4b85-9e2e-ecd561c32dfb

After (both tabbing away and clicking coerces):

https://github.com/MudBlazor/MudBlazor/assets/7112040/633e9a65-96e7-47cd-9e6a-4463c73cebab

Checklist

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 90.22%. Comparing base (28bc599) to head (d515bef). Report is 170 commits behind head on dev.

Files Patch % Lines
...r/Components/Autocomplete/MudAutocomplete.razor.cs 33.33% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #8914 +/- ## ========================================== + Coverage 89.82% 90.22% +0.39% ========================================== Files 412 424 +12 Lines 11878 12283 +405 Branches 2364 2411 +47 ========================================== + Hits 10670 11082 +412 + Misses 681 670 -11 - Partials 527 531 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

danielchalmers commented 5 months ago

@henon done but there's like a dozen other methods that are missing Async including the public Clear. I think these should be done in a separate PR