Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete OnBlur not called #1415

Closed
AdriaanKuipers opened this issue Apr 21, 2021 · 4 comments · Fixed by #1482
Closed

Autocomplete OnBlur not called #1415

AdriaanKuipers opened this issue Apr 21, 2021 · 4 comments · Fixed by #1482
Assignees
Labels
bug Something does not work as intended/expected
Milestone

Comments

@AdriaanKuipers
Copy link

Describe the bug
The OnBlur callback on an autocomplete isn't getting called

Expected behavior
OnBlur gets called when the autocomplete is blurred

TryMudBlazor
https://try.mudblazor.com/snippet/QYcbaIvrnlMYqcCT

@AdriaanKuipers AdriaanKuipers added the bug Something does not work as intended/expected label Apr 21, 2021
@porkopek
Copy link
Contributor

This is a bug.
In the MudAutocomplete.razor.cs file you just need to put this

   private Task OnInputBlurred(FocusEventArgs args)
        {
            OnBlur.InvokeAsync(args); //  <== This is the missing line
            return Task.CompletedTask;
        }

Would you do a PR?

@AdriaanKuipers
Copy link
Author

Might take a few days, but I'll give it a shot...

@porkopek
Copy link
Contributor

I think there is no hurry :-)

GerkinDev added a commit to GerkinDev/MudBlazor that referenced this issue May 2, 2021
@GerkinDev
Copy link
Contributor

Actually, I need this

GerkinDev added a commit to GerkinDev/MudBlazor that referenced this issue May 2, 2021
henon pushed a commit that referenced this issue May 6, 2021
* fix(autocomplete): call the `OnBlur` method when input blurred

Fixes #1415

* Update MudAutocomplete.razor.cs

Apply feedback from https://github.com/Garderoben/MudBlazor/pull/1482#discussion_r625303642
@henon henon added this to the 5.0.9 milestone May 6, 2021
@henon henon closed this as completed May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants