File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
src/BootstrapBlazor/Components Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
55
6+ using Microsoft . AspNetCore . Components . Web ;
7+
68namespace BootstrapBlazor . Components ;
79
810/// <summary>
@@ -63,7 +65,7 @@ public abstract class ButtonBase : TooltipWrapperBase
6365 /// <para lang="en">Gets or sets the OnClick event</para>
6466 /// </summary>
6567 [ Parameter ]
66- public EventCallback OnClick { get ; set ; }
68+ public EventCallback < MouseEventArgs > OnClick { get ; set ; }
6769
6870 /// <summary>
6971 /// <para lang="zh">获得/设置 OnClick 事件不刷新父组件</para>
@@ -334,7 +336,7 @@ protected override async ValueTask DisposeAsync(bool disposing)
334336 {
335337 if ( OnClick . HasDelegate )
336338 {
337- OnClick = EventCallback . Empty ;
339+ OnClick = EventCallback < MouseEventArgs > . Empty ;
338340 }
339341
340342 if ( IsAsync && ValidateForm != null )
Original file line number Diff line number Diff line change @@ -577,6 +577,16 @@ internal void RegisterAsyncSubmitButton(ButtonBase button)
577577 AsyncSubmitButtons . Add ( button ) ;
578578 }
579579
580+ /// <summary>
581+ /// <para lang="zh">注销提交按钮</para>
582+ /// <para lang="en">Unregisters a submit button</para>
583+ /// </summary>
584+ /// <param name="button"></param>
585+ internal void UnregisterAsyncSubmitButton ( ButtonBase button )
586+ {
587+ AsyncSubmitButtons . Remove ( button ) ;
588+ }
589+
580590 private TaskCompletionSource < bool > ? _tcs ;
581591
582592 private async Task OnValidSubmitForm ( EditContext context )
You can’t perform that action at this time.
0 commit comments