Skip to content

Commit 4244edd

Browse files
committed
Revert "refactor: 单独响应 OnCloseAsync 参数"
This reverts commit e25a10d.
1 parent 8241753 commit 4244edd

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,9 @@ public async ValueTask ToggleLoading(bool state)
146146
if (!IsTracking)
147147
{
148148
builder.OpenComponent<DialogCloseButton>(20);
149-
builder.AddAttribute(21, nameof(DialogCloseButton.Icon), CloseButtonIcon);
150-
builder.AddAttribute(22, nameof(DialogCloseButton.Text), CloseButtonText);
151-
if (OnCloseAsync != null)
152-
{
153-
builder.AddAttribute(22, nameof(DialogCloseButton.OnClickWithoutRender), OnCloseAsync);
154-
}
149+
builder.AddAttribute(21, nameof(Button.Icon), CloseButtonIcon);
150+
builder.AddAttribute(22, nameof(Button.Text), CloseButtonText);
151+
builder.AddAttribute(23, nameof(Button.OnClickWithoutRender), OnCloseAsync);
155152
builder.CloseComponent();
156153
}
157154
builder.OpenComponent<Button>(30);

0 commit comments

Comments
 (0)