-
-
Notifications
You must be signed in to change notification settings - Fork 381
feat(ValidateForm): add UnregisterAsyncSubmitButton method #7889
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -577,6 +577,16 @@ internal void RegisterAsyncSubmitButton(ButtonBase button) | |
| AsyncSubmitButtons.Add(button); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// <para lang="zh">注销提交按钮</para> | ||
| /// <para lang="en">Unregisters a submit button</para> | ||
| /// </summary> | ||
| /// <param name="button"></param> | ||
| internal void UnregisterAsyncSubmitButton(ButtonBase button) | ||
| { | ||
| AsyncSubmitButtons.Remove(button); | ||
| } | ||
|
Comment on lines
+585
to
+588
|
||
|
|
||
| private TaskCompletionSource<bool>? _tcs; | ||
|
|
||
| private async Task OnValidSubmitForm(EditContext context) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing ButtonBase.OnClick from untyped EventCallback to EventCallback is a public API breaking change and appears unrelated to the ValidateForm unregister feature. This will break consumers that set OnClick from C# (or via reflection/parameter dictionaries) expecting EventCallback. Consider keeping the existing EventCallback OnClick for compatibility (or adding a new typed callback alongside it / marking the old one obsolete) and update release notes accordingly if the breaking change is intended.