diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 1c24c2ad89aeb4642c01f4d561e49f6d348fb08b..7bd91521fa98c8b43209a631555def7bd8165779 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -3,7 +3,7 @@ true logo.png - 5.0.23-beta06 + 5.0.23-beta07 https://gitee.com/LongbowEnterprise/BootstrapBlazor/wikis diff --git a/src/BootstrapBlazor/Components/Dialog/DialogService.cs b/src/BootstrapBlazor/Components/Dialog/DialogService.cs index daecb7e3369f466c7bb422f6d1c7fa988a913342..8f931062ec3237bb728fa1a813275b36dcd96017 100644 --- a/src/BootstrapBlazor/Components/Dialog/DialogService.cs +++ b/src/BootstrapBlazor/Components/Dialog/DialogService.cs @@ -87,20 +87,20 @@ namespace BootstrapBlazor.Components option.CloseButtonText ??= EditDialogLocalizer[nameof(option.CloseButtonText)]; option.SaveButtonText ??= EditDialogLocalizer[nameof(option.SaveButtonText)]; - option.Component = BootstrapDynamicComponent.CreateComponent>(new[] + option.Component = BootstrapDynamicComponent.CreateComponent>(new KeyValuePair[] { - new KeyValuePair(nameof(EditDialog.Model), option.Model), - new KeyValuePair(nameof(EditDialog.ShowLabel), option.ShowLabel), - new KeyValuePair(nameof(EditDialog.CloseButtonText), option.CloseButtonText!), - new KeyValuePair(nameof(EditDialog.SaveButtonText), option.SaveButtonText!), - new KeyValuePair(nameof(EditDialog.Items), option.Items), - new KeyValuePair(nameof(EditDialog.BodyTemplate), option.DialogBodyTemplate!), - new KeyValuePair(nameof(EditDialog.OnCloseAsync), new Func(async () => + new(nameof(EditDialog.Model), option.Model), + new(nameof(EditDialog.ShowLabel), option.ShowLabel), + new(nameof(EditDialog.CloseButtonText), option.CloseButtonText), + new(nameof(EditDialog.SaveButtonText), option.SaveButtonText), + new(nameof(EditDialog.Items), option.Items ?? Utility.GenerateColumns(item => item.Editable)), + new(nameof(EditDialog.BodyTemplate), option.DialogBodyTemplate), + new(nameof(EditDialog.OnCloseAsync), new Func(async () => { option.Dialog.RemoveDialog(); await option.Dialog.CloseOrPopDialog(); })), - new KeyValuePair(nameof(EditDialog.OnSaveAsync), new Func(async context => + new(nameof(EditDialog.OnSaveAsync), new Func(async context => { if(option.OnSaveAsync != null) {