-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MudOverlay: Remove OnClick
callback
#8989
Comments
I'm planning to replace all other usages of |
We just make OnClick obsolete with a message to use VisibleChanged instead. After it has been obsoleted for a time we can remove it in a future major version. |
/// <summary>
/// Triggers an event callback when the overlay is clicked.
/// </summary>
[Parameter]
[Obsolete("Use VisibleChanged with AutoClose to handle the overlay disappearing in a universal way.")]
public EventCallback<MouseEventArgs> OnClick { get; set; } Can we make AutoClose true by default? It seems like that's the only way it's actually used in the whole library so it would make sense if we made that switch while moving away from |
OK, we can change As for prevending people to use |
Or maybe we add an WPF has such logic, would this be ok for Blazor as well @ScarletKuro ? |
ping @ScarletKuro |
I'm going to put this on hold due to the potential for issues to pop up and some components (MudDrawer) really need further refactoring which will take more time. |
Yeah |
Feature request type
Enhance component
Component name
MudOverlay
Is your feature request related to a problem?
MudOverlay.OnClick
might be an antipattern.It's commonly used to handle close events but you should use
VisibleChanged
instead as seen in #8914. This change resolved #3825 and #3824.This will have to be fixed in several other components too where it is impacting accessibility: https://github.com/search?q=repo%3AMudBlazor%2FMudBlazor+%3CMudOverlay+OnClick&type=code
Describe the solution you'd like
The callback should have some kind of warning, or be removed altogether, so people don't rely on it for close-callbacks.
Users will still be able to subscribe to
@onclick
themselves.Have you seen this feature anywhere else?
No response
Describe alternatives you've considered
No response
Pull Request
Code of Conduct
The text was updated successfully, but these errors were encountered: