Skip to content

Commit

Permalink
Added Hide() to DialogService
Browse files Browse the repository at this point in the history
  • Loading branch information
Stavros Kasidis committed Aug 9, 2019
1 parent f33801c commit 1e01945
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BlazorDialog/BlazorDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@

public void Hide()
{
dialogService.HideDialog(this.Id, null);
dialogService.HideDialog(this.Id);
}
}
5 changes: 5 additions & 0 deletions BlazorDialog/BlazorDialogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public BlazorDialogService(DialogStates states)
};
}

public void HideDialog(string dialogId)
{
_dialogStates.HideDialog(dialogId, null);
}

public void HideDialog(string dialogId, object result)
{
_dialogStates.HideDialog(dialogId, result);
Expand Down
2 changes: 1 addition & 1 deletion BlazorDialog/DialogContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void Hide<TResult>(TResult result)

public void Hide()
{
_dialogService.HideDialog(this._dialogId, null);
_dialogService.HideDialog(this._dialogId);
}
}
}
1 change: 1 addition & 0 deletions BlazorDialog/IBlazorDialogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace BlazorDialog
public interface IBlazorDialogService
{
void HideDialog(string dialogId, object result);
void HideDialog(string dialogId);
Task ShowDialog(string dialogId);
Task ShowDialog(string dialogId, object input);
Task<TResult> ShowDialog<TResult>(string dialogId);
Expand Down

0 comments on commit 1e01945

Please sign in to comment.