Skip to content

Commit 495f438

Browse files
Merge pull request #25 from stavroskasidis/release/3.2
Release 3.2
2 parents ec927bd + 2e645df commit 495f438

4 files changed

Lines changed: 22 additions & 6 deletions

File tree

BlazorDialog/BlazorDialog.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Copyright />
1313
<PackageTags>blazor blazor-component blazor-dialog dialog modal blazor-modal blazordialog blazormodaldialog blazormodal razor razor-components razorcomponents</PackageTags>
1414
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
15-
<Version>3.1.0</Version>
15+
<Version>3.2.0</Version>
1616
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
1717
<Product>BlazorDialog</Product>
1818
</PropertyGroup>

BlazorDialog/Components/Dialog.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@
166166
if (taskCompletionSource != null)
167167
{
168168
taskCompletionSource.SetResult(result);
169-
taskCompletionSource = null;
170169
}
171170
};
172171
}

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ Make sure that there is a call to `app.UseStaticFiles();` in your server project
8282
8383
## Release Notes
8484

85-
<details open="open"><summary>3.1</summary>
85+
<details open="open"><summary>3.2</summary>
86+
87+
>- Fix for a bug when the same dialog is presented consecutively, never returning result. Contributed by [thanoskapsalis](https://github.com/thanoskapsalis).
88+
</details>
89+
90+
91+
<details><summary>3.1</summary>
8692

8793
>- Added `ForceAllowNavigation` and `ForcePreventNavigation` methods to the `Dialog` component to allow/prevent navigation regardless of the `PreventNavigation` parameter.
8894
</details>

TestApps/BlazorDialog.TestAppsCommon/IndexCommon.razor

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,15 @@
129129
<button @onclick="SimpleDialogOnClick">Simple Dialog</button>
130130
<button @onclick="SimpleDialogBigOnClick">Simple Dialog Big</button>
131131
<button @onclick="SimpleLargeDialogDisablePreventNavigation">Simple Dialog Big allow navigation</button>
132-
132+
<button @onclick="SimpleDialogBackToBack">Simple Dialog BackToBack</button>
133133
@if (dialogResult != null)
134134
{
135-
<div>DialogResult: @dialogResult</div>
135+
<div>DialogResult: @dialogResult @((secondDialogResult != null) ? "and " + secondDialogResult : "") </div>
136136
}
137137

138-
@code{
138+
@code {
139139
string dialogResult = null;
140+
string secondDialogResult = null;
140141
bool isCentered;
141142
DialogSize size;
142143
DialogAnimation animation;
@@ -147,6 +148,16 @@
147148
dialogResult = await dialogService.ShowDialog<string>("simple-dialog", "(Simple Dialog) Are you sure?");
148149
}
149150

151+
async Task SimpleDialogBackToBack()
152+
{
153+
dialogResult = await dialogService.ShowDialog<string>("simple-dialog", "(Simple Dialog) Are you sure?");
154+
if (dialogResult == "no")
155+
{
156+
return;
157+
}
158+
secondDialogResult = await dialogService.ShowDialog<string>("simple-dialog", "(Simple Dialog) Are you really sure?");
159+
}
160+
150161
async Task SimpleDialogBigOnClick()
151162
{
152163
dialogResult = await dialogService.ShowDialog<string>("simple-large-dialog", "(Simple Dialog Large) Are you sure?");

0 commit comments

Comments
 (0)