Skip to content

Commit

Permalink
Merge pull request #25 from stavroskasidis/release/3.2
Browse files Browse the repository at this point in the history
Release 3.2
  • Loading branch information
stavroskasidis authored Jul 17, 2024
2 parents ec927bd + 2e645df commit 495f438
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BlazorDialog/BlazorDialog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Copyright />
<PackageTags>blazor blazor-component blazor-dialog dialog modal blazor-modal blazordialog blazormodaldialog blazormodal razor razor-components razorcomponents</PackageTags>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<Version>3.1.0</Version>
<Version>3.2.0</Version>
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
<Product>BlazorDialog</Product>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion BlazorDialog/Components/Dialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
if (taskCompletionSource != null)
{
taskCompletionSource.SetResult(result);
taskCompletionSource = null;
}
};
}
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ Make sure that there is a call to `app.UseStaticFiles();` in your server project
## Release Notes

<details open="open"><summary>3.1</summary>
<details open="open"><summary>3.2</summary>

>- Fix for a bug when the same dialog is presented consecutively, never returning result. Contributed by [thanoskapsalis](https://github.com/thanoskapsalis).
</details>

<details><summary>3.1</summary>

>- Added `ForceAllowNavigation` and `ForcePreventNavigation` methods to the `Dialog` component to allow/prevent navigation regardless of the `PreventNavigation` parameter.
</details>
Expand Down
17 changes: 14 additions & 3 deletions TestApps/BlazorDialog.TestAppsCommon/IndexCommon.razor
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,15 @@
<button @onclick="SimpleDialogOnClick">Simple Dialog</button>
<button @onclick="SimpleDialogBigOnClick">Simple Dialog Big</button>
<button @onclick="SimpleLargeDialogDisablePreventNavigation">Simple Dialog Big allow navigation</button>

<button @onclick="SimpleDialogBackToBack">Simple Dialog BackToBack</button>
@if (dialogResult != null)
{
<div>DialogResult: @dialogResult</div>
<div>DialogResult: @dialogResult @((secondDialogResult != null) ? "and " + secondDialogResult : "") </div>
}

@code{
@code {
string dialogResult = null;
string secondDialogResult = null;
bool isCentered;
DialogSize size;
DialogAnimation animation;
Expand All @@ -147,6 +148,16 @@
dialogResult = await dialogService.ShowDialog<string>("simple-dialog", "(Simple Dialog) Are you sure?");
}

async Task SimpleDialogBackToBack()
{
dialogResult = await dialogService.ShowDialog<string>("simple-dialog", "(Simple Dialog) Are you sure?");
if (dialogResult == "no")
{
return;
}
secondDialogResult = await dialogService.ShowDialog<string>("simple-dialog", "(Simple Dialog) Are you really sure?");
}

async Task SimpleDialogBigOnClick()
{
dialogResult = await dialogService.ShowDialog<string>("simple-large-dialog", "(Simple Dialog Large) Are you sure?");
Expand Down

0 comments on commit 495f438

Please sign in to comment.