mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-04 05:35:44 +00:00
DialogService Alert and Confirm buttons text missing when no options are specified
Fix #2060
This commit is contained in:
@@ -457,7 +457,7 @@ namespace Radzen
|
||||
public virtual async Task<bool?> Confirm(string message = "Confirm?", string title = "Confirm", ConfirmOptions options = null, CancellationToken? cancellationToken = null)
|
||||
{
|
||||
// Validate and set default values for the dialog options
|
||||
options ??= new();
|
||||
options ??= new() { OkButtonText = "Ok", CancelButtonText = "Cancel" };
|
||||
options.Width = !String.IsNullOrEmpty(options.Width) ? options.Width : ""; // Width is set to 600px by default by OpenAsync
|
||||
options.Style = !String.IsNullOrEmpty(options.Style) ? options.Style : "";
|
||||
options.CssClass = !String.IsNullOrEmpty(options.CssClass) ? $"rz-dialog-confirm {options.CssClass}" : "rz-dialog-confirm";
|
||||
@@ -504,7 +504,7 @@ namespace Radzen
|
||||
public virtual async Task<bool?> Alert(string message = "", string title = "Message", AlertOptions options = null, CancellationToken? cancellationToken = null)
|
||||
{
|
||||
// Validate and set default values for the dialog options
|
||||
options ??= new();
|
||||
options ??= new() { OkButtonText = "Ok" };
|
||||
options.Width = !String.IsNullOrEmpty(options.Width) ? options.Width : "";
|
||||
options.Style = !String.IsNullOrEmpty(options.Style) ? options.Style : "";
|
||||
options.CssClass = !String.IsNullOrEmpty(options.CssClass) ? $"rz-dialog-alert {options.CssClass}" : "rz-dialog-alert";
|
||||
|
||||
Reference in New Issue
Block a user