Cancel Save @code { private string _value = string.Empty; [Parameter] public string Title { get; set; } = string.Empty; [Parameter] public string Label { get; set; } = string.Empty; [Parameter] public string? Value { get; set; } [CascadingParameter] private IMudDialogInstance? MudDialog { get; set; } protected override void OnInitialized() { _value = Value ?? string.Empty; } private void Submit() { if (MudDialog != null && !string.IsNullOrWhiteSpace(_value)) { MudDialog.Close(DialogResult.Ok(_value)); } } private void Cancel() { MudDialog?.Cancel(); } }