diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index ca6a6838750..9c83218bebf 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@  - 10.3.1-beta04 + 10.3.1-beta05 diff --git a/src/BootstrapBlazor/Components/Dialog/DialogOption.cs b/src/BootstrapBlazor/Components/Dialog/DialogOption.cs index 56cbf9a2ca6..1fde2fb4105 100644 --- a/src/BootstrapBlazor/Components/Dialog/DialogOption.cs +++ b/src/BootstrapBlazor/Components/Dialog/DialogOption.cs @@ -6,244 +6,242 @@ namespace BootstrapBlazor.Components; /// -/// Configuration class for the Dialog component -/// Configuration class for the Dialog component +/// Dialog 对话框组件 +/// Dialog component /// public class DialogOption { /// - /// 获得/设置 the related modal 实例 + /// 获得/设置 关联的 Modal 实例 /// Gets or sets the related modal instance /// internal Modal? Modal { get; set; } /// - /// 获得/设置 the dialog title + /// 获得/设置 对话框标题 /// Gets or sets the dialog title /// public string? Title { get; set; } /// - /// 获得/设置 the custom 样式 of the dialog + /// 获得/设置 对话框自定义样式 /// Gets or sets the custom style of the dialog /// public string? Class { get; set; } /// - /// 获得/设置 the size of the dialog + /// 获得/设置 对话框尺寸 /// Gets or sets the size of the dialog /// public Size Size { get; set; } = Size.ExtraExtraLarge; /// - /// 获得/设置 the full screen size of the dialog, default is None + /// 获得/设置 对话框全屏尺寸 默认值为 None /// Gets or sets the full screen size of the dialog, default is None /// - /// To ensure functionality, when this value is set, , , and are not available public FullScreenSize FullScreenSize { get; set; } = FullScreenSize.None; /// - /// 获得/设置 是否 to show the maximize 按钮, default is false + /// 获得/设置 是否显示最大化按钮 默认值为 false /// Gets or sets whether to show the maximize button, default is false /// - /// To ensure functionality, when this value is set to true, and are not available public bool ShowMaximizeButton { get; set; } /// - /// 获得/设置 是否 the dialog is vertically centered, default is true + /// 获得/设置 是否垂直居中 默认值为 true /// Gets or sets whether the dialog is vertically centered, default is true /// public bool IsCentered { get; set; } = true; /// - /// 获得/设置 是否 the dialog 内容 scrolls when it is too long, default is false + /// 获得/设置 内容过长时是否滚动 默认值为 false /// Gets or sets whether the dialog content scrolls when it is too long, default is false /// public bool IsScrolling { get; set; } = false; /// - /// 获得/设置 是否 to show the resize 按钮, default is false + /// 获得/设置 是否显示调整大小按钮 默认值为 false /// Gets or sets whether to show the resize button, default is false /// public bool ShowResize { get; set; } /// - /// 获得/设置 是否 to show the close 按钮, default is true + /// 获得/设置 是否显示关闭按钮 默认值为 true /// Gets or sets whether to show the close button, default is true /// public bool ShowCloseButton { get; set; } = true; /// - /// 获得/设置 是否 to show the header close 按钮, default is true + /// 获得/设置 是否显示标题栏关闭按钮 默认值为 true /// Gets or sets whether to show the header close button, default is true /// public bool ShowHeaderCloseButton { get; set; } = true; /// - /// 获得/设置 是否 to enable fade animation, default is null + /// 获得/设置 是否启用渐显动画 默认值为 null /// Gets or sets whether to enable fade animation, default is null /// public bool? IsFade { get; set; } /// - /// 获得/设置 是否 to support closing the dialog with the ESC key, default is true + /// 获得/设置 是否支持通过 ESC 关闭对话框 默认值为 true /// Gets or sets whether to support closing the dialog with the ESC key, default is true /// public bool IsKeyboard { get; set; } = true; /// - /// 获得/设置 是否 to support closing the dialog by clicking the backdrop, default is false + /// 获得/设置 是否支持点击背景关闭对话框 默认值为 false /// Gets or sets whether to support closing the dialog by clicking the backdrop, default is false /// public bool IsBackdrop { get; set; } /// - /// 获得/设置 是否 to show the footer, default is true + /// 获得/设置 是否显示页脚 默认值为 true /// Gets or sets whether to show the footer, default is true /// public bool ShowFooter { get; set; } = true; /// - /// 获得/设置 是否 to show the print 按钮, default is false + /// 获得/设置 是否显示打印按钮 默认值为 false /// Gets or sets whether to show the print button, default is false /// public bool ShowPrintButton { get; set; } /// - /// 获得/设置 是否 to show the save 按钮, default is false + /// 获得/设置 是否显示保存按钮 默认值为 false /// Gets or sets whether to show the save button, default is false /// public bool ShowSaveButton { get; set; } /// - /// 获得/设置 是否 to show the print 按钮 in the header, default is false + /// 获得/设置 是否在标题栏显示打印按钮 默认值为 false /// Gets or sets whether to show the print button in the header, default is false /// public bool ShowPrintButtonInHeader { get; set; } /// - /// 获得/设置 the text of the print 按钮 in the header, default is "Print" from the resource file + /// 获得/设置 标题栏打印按钮文本 默认值为资源文件中的 "Print" /// Gets or sets the text of the print button in the header, default is "Print" from the resource file /// public string? PrintButtonText { get; set; } /// - /// 获得/设置 the related 数据, mostly used for passing values + /// 获得/设置 关联数据多用于传值 /// Gets or sets the related data, mostly used for passing values /// public object? BodyContext { get; set; } /// - /// 获得/设置 the ModalBody component + /// 获得/设置 ModalBody 组件 /// Gets or sets the ModalBody component /// public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 the ModalFooter component + /// 获得/设置 ModalFooter 组件 /// Gets or sets the ModalFooter component /// public RenderFragment? FooterTemplate { get; set; } /// - /// 获得/设置 the ModalHeader component 模板 + /// 获得/设置 ModalHeader 组件模板 /// Gets or sets the ModalHeader component template /// public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 the custom 按钮s in the ModalHeader component + /// 获得/设置 ModalHeader 组件自定义按钮 /// Gets or sets the custom buttons in the ModalHeader component /// public RenderFragment? HeaderToolbarTemplate { get; set; } /// - /// 获得/设置 the custom component + /// 获得/设置 自定义组件 /// Gets or sets the custom component /// public BootstrapDynamicComponent? Component { get; set; } /// - /// 获得/设置 the 图标 of the save 按钮, default is null and uses the current theme 图标 + /// 获得/设置 保存按钮图标 默认值为 null 且使用当前主题图标 /// Gets or sets the icon of the save button, default is null and uses the current theme icon /// public string? SaveButtonIcon { get; set; } /// - /// 获得/设置 the text of the save 按钮 + /// 获得/设置 保存按钮文本 /// Gets or sets the text of the save button /// public string? SaveButtonText { get; set; } /// - /// 获得/设置 the 回调方法 for the save 按钮 + /// 获得/设置 保存按钮回调方法 /// Gets or sets the callback method for the save button /// public Func>? OnSaveAsync { get; set; } /// - /// 获得/设置 the 图标 of the close 按钮, default is null and uses the current theme 图标 + /// 获得/设置 关闭按钮图标 默认值为 null 且使用当前主题图标 /// Gets or sets the icon of the close button, default is null and uses the current theme icon /// public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 the text of the close 按钮 + /// 获得/设置 关闭按钮文本 /// Gets or sets the text of the close button /// public string? CloseButtonText { get; set; } /// - /// 获得/设置 the 回调方法 for closing the dialog + /// 获得/设置 关闭对话框回调方法 /// Gets or sets the callback method for closing the dialog /// public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 是否 to automatically close the dialog after saving successfully, default is true + /// 获得/设置 是否自动关闭对话框(保存成功后) 默认值为 true /// Gets or sets whether to automatically close the dialog after saving successfully, default is true /// public bool IsAutoCloseAfterSave { get; set; } = true; /// - /// 获得/设置 是否 the dialog can be dragged, default is false + /// 获得/设置 是否允许拖拽对话框 默认值为 false /// Gets or sets whether the dialog can be dragged, default is false /// public bool IsDraggable { get; set; } /// - /// 获得/设置 the 回调方法 when the dialog is shown + /// 获得/设置 对话框显示回调方法 /// Gets or sets the callback method when the dialog is shown /// public Func? OnShownAsync { get; set; } /// - /// 获得/设置 是否 to show the export PDF 按钮, default is false + /// 获得/设置 是否显示导出 PDF 按钮 默认值为 false /// Gets or sets whether to show the export PDF button, default is false /// public bool ShowExportPdfButton { get; set; } /// - /// 获得/设置 是否 to show the export PDF 按钮 in the header, default is false + /// 获得/设置 是否在标题栏显示导出 PDF 按钮 默认值为 false /// Gets or sets whether to show the export PDF button in the header, default is false /// public bool ShowExportPdfButtonInHeader { get; set; } /// - /// 获得/设置 the configuration options for the export PDF 按钮 + /// 获得/设置 导出 PDF 按钮配置 /// Gets or sets the configuration options for the export PDF button /// public ExportPdfButtonOptions? ExportPdfButtonOptions { get; set; } /// - /// 获得/设置 是否 to hide the previous dialog when opening a new one, default is false + /// 获得/设置 是否隐藏上一个对话框 默认值为 false /// Gets or sets whether to hide the previous dialog when opening a new one, default is false /// public bool IsHidePreviousDialog { get; set; } /// - /// Method to close the dialog - /// Method to close the dialog + /// 关闭对话框方法 + /// Closes the dialog /// public async Task CloseDialogAsync() { @@ -254,8 +252,8 @@ public async Task CloseDialogAsync() } /// - /// Method to convert parameters to component attributes - /// Method to convert parameters to component attributes + /// 将参数转换为组件特性 + /// Converts parameters to component attributes /// public Dictionary ToAttributes() { diff --git a/src/BootstrapBlazor/Components/Dialog/EditDialog.razor b/src/BootstrapBlazor/Components/Dialog/EditDialog.razor index 43a8208744d..1f6b37ed1d1 100644 --- a/src/BootstrapBlazor/Components/Dialog/EditDialog.razor +++ b/src/BootstrapBlazor/Components/Dialog/EditDialog.razor @@ -3,7 +3,8 @@ @inherits DialogBase @attribute [BootstrapModuleAutoLoader("Dialog/EditDialog.razor.js", AutoInvokeInit = false, AutoInvokeDispose = false)] - + @if (BodyTemplate != null) { @@ -16,9 +17,10 @@ } else { - + @RenderFooter diff --git a/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs b/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs index 113f0592a39..36a00c3c169 100644 --- a/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs +++ b/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs @@ -54,9 +54,7 @@ public partial class EditDialog /// Gets or sets Save Callback Delegate. Return false to keep edit dialog, true to close it /// [Parameter] -#if NET6_0_OR_GREATER [EditorRequired] -#endif public Func>? OnSaveAsync { get; set; } /// @@ -87,6 +85,13 @@ public partial class EditDialog [Parameter] public bool? DisableAutoSubmitFormByEnter { get; set; } + /// + /// 获得/设置 标签宽度 默认为 120 + /// Gets or sets Label Width. Default is 120 + /// + [Parameter] + public int? LabelWidth { get; set; } + /// /// 获得/设置 DialogFooterTemplate 实例 /// Gets or sets DialogFooterTemplate Instance diff --git a/src/BootstrapBlazor/Components/Dialog/EditDialogOption.cs b/src/BootstrapBlazor/Components/Dialog/EditDialogOption.cs index 4c1f4160baf..be02a006942 100644 --- a/src/BootstrapBlazor/Components/Dialog/EditDialogOption.cs +++ b/src/BootstrapBlazor/Components/Dialog/EditDialogOption.cs @@ -24,86 +24,77 @@ public EditDialogOption() } /// - /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false - /// Gets or sets Whether Component Uses Tracking Mode to Update Editing Items Directly. Default is false + /// /// public bool IsTracking { get; set; } /// - /// 获得/设置 是否显示标签 默认为 true 显示标签 - /// Gets or sets Whether to Show Label. Default is true + /// /// public bool ShowLabel { get; set; } = true; /// - /// 获得/设置 实体类编辑模式 Add 还是 Update - /// Gets or sets Item Changed Type (Add or Update) + /// /// public ItemChangedType ItemChangedType { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 null - /// Gets or sets Items Per Row. Default is null + /// /// public int? ItemsPerRow { get; set; } /// - /// 获得/设置 设置行内组件布局格式 默认 Row 布局 - /// Gets or sets Row Layout. Default is Row + /// /// public RowType RowType { get; set; } /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 - /// Gets or sets Label Alignment in Inline Mode. Default is None, equivalent to Left + /// /// public Alignment LabelAlign { get; set; } /// - /// 获得/设置 查询时是否显示正在加载中动画 默认为 false - /// Gets or sets Whether to Show Loading Animation When Querying. Default is false + /// /// public bool ShowLoading { get; set; } /// - /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 - /// Gets or sets Unset Group Items Position. Default is false (at the end) + /// /// public bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// 获得/设置 编辑框模型 - /// Gets or sets Edit Model + /// /// public TModel? Model { get; set; } /// - /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 - /// Gets or sets Whether to Disable Auto Submit Form By Enter. Default is null + /// /// public bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// 获得 编辑项集合 - /// Get Items + /// + /// + public int? LabelWidth { get; set; } + + /// + /// /// public IEnumerable? Items { get; set; } /// - /// 获得/设置 EditDialog Body 模板 - /// Gets or sets EditDialog Body Template + /// /// public RenderFragment? DialogBodyTemplate { get; set; } /// - /// 获得/设置 EditDialog Footer 模板 - /// Gets or sets EditDialog Footer Template + /// /// public RenderFragment? DialogFooterTemplate { get; set; } /// - /// 获得/设置 保存回调委托 - /// Gets or sets Save Callback Delegate + /// /// public Func>? OnEditAsync { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/ITableEditDialogOption.cs b/src/BootstrapBlazor/Components/Table/ITableEditDialogOption.cs index 956545c58d6..52774fe3354 100644 --- a/src/BootstrapBlazor/Components/Table/ITableEditDialogOption.cs +++ b/src/BootstrapBlazor/Components/Table/ITableEditDialogOption.cs @@ -73,6 +73,12 @@ public interface ITableEditDialogOption /// bool? DisableAutoSubmitFormByEnter { get; set; } + /// + /// 获得/设置 编辑弹窗标签宽度 默认为 null 使用样式默认值 120 + /// Gets or sets Edit Dialog Label Width. Default is null use css variable default 120 + /// + int? LabelWidth { get; set; } + /// /// 获得/设置 保存按钮文本 /// Gets or sets save button text diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs index cc3f3275cc5..6e09c7d7431 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs @@ -953,6 +953,7 @@ private void AppendOptions(ITableEditDialogOption option, ItemChangedType option.ShowUnsetGroupItemsOnTop = ShowUnsetGroupItemsOnTop; option.DisableAutoSubmitFormByEnter = DisableAutoSubmitFormByEnter; option.IsTracking = IsTracking; + option.LabelWidth = EditDialogLabelWidth; option.DialogFooterTemplate = EditFooterTemplate; BeforeShowEditDialogCallback?.Invoke(option); diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs index ad05dabf395..61b2722903a 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs @@ -330,7 +330,7 @@ private string GetSortTooltip(ITableColumn col) => SortName != col.GetFieldName( public bool IsHideFooterWhenNoData { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 2 + /// 获得/设置 编辑弹窗每行显示组件数量 默认为 2 /// Gets or sets Items per row in Edit Dialog. Default 2 /// [Parameter] @@ -350,6 +350,13 @@ private string GetSortTooltip(ITableColumn col) => SortName != col.GetFieldName( [Parameter] public Alignment EditDialogLabelAlign { get; set; } + /// + /// 获得/设置 编辑弹窗标签宽度 默认为 null 使用样式默认值 120 + /// Gets or sets Edit Dialog Label Width. Default is null use css variable default 120 + /// + [Parameter] + public int? EditDialogLabelWidth { get; set; } + /// /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 /// Gets or sets Whether to disable auto submit form by enter. Default null diff --git a/src/BootstrapBlazor/Components/Table/TableEditDrawerOption.cs b/src/BootstrapBlazor/Components/Table/TableEditDrawerOption.cs index 9880d3c5898..e11096e2075 100644 --- a/src/BootstrapBlazor/Components/Table/TableEditDrawerOption.cs +++ b/src/BootstrapBlazor/Components/Table/TableEditDrawerOption.cs @@ -14,125 +14,102 @@ namespace BootstrapBlazor.Components; public class TableEditDrawerOption : ITableEditDialogOption { /// - /// 构造函数 - /// Constructor - /// - public TableEditDrawerOption() - { - ShowLabel = true; - } - - /// - /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新,默认为 false - /// Gets or sets whether to use Tracking mode to directly update edited items. Default is false + /// /// public bool IsTracking { get; set; } /// - /// 获得/设置 是否显示标签,默认为 true - /// Gets or sets whether to display label. Default is true + /// /// - public bool ShowLabel { get; set; } + public bool ShowLabel { get; set; } = true; /// - /// 获得/设置 实体类编辑模式 Add 还是 Update - /// Gets or sets entity class edit mode, Add or Update + /// /// public ItemChangedType ItemChangedType { get; set; } /// - /// 获得/设置 每行显示组件数量,默认为 null - /// Gets or sets the number of components displayed per row. Default is null + /// /// public int? ItemsPerRow { get; set; } /// - /// 获得/设置 设置行内组件布局格式,默认为 Row 布局 - /// Gets or sets the layout format of inline components. Default is Row layout + /// /// public RowType RowType { get; set; } /// - /// 获得/设置 在 RowType Inline 模式下标签对齐方式,默认为 None(等效于 Left 左对齐) - /// Gets or sets the label alignment in RowType Inline mode. Default is None (equivalent to Left) + /// /// public Alignment LabelAlign { get; set; } /// - /// 获得/设置 查询时是否显示正在加载中动画,默认为 false - /// Gets or sets whether to display loading animation when querying. Default is false + /// /// public bool ShowLoading { get; set; } /// - /// 获得/设置 未分组编辑项布局位置,默认为 false 在尾部 - /// Gets or sets the layout position of ungrouped edit items. Default is false (at the end) + /// /// public bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// 获得/设置 编辑框模型 - /// Gets or sets edit form model + /// /// public TModel? Model { get; set; } /// - /// 获得/设置 是否禁用表单内回车自动提交功能,默认为 null 未设置 - /// Gets or sets whether to disable auto submit form by Enter key. Default is null + /// /// public bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// 获得/设置 关闭按钮图标,默认为 null 使用当前主题图标 - /// Gets or sets close button icon. Default is null (use current theme icon) + /// + /// + public int? LabelWidth { get; set; } = 120; + + /// + /// /// public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 关闭按钮文本 - /// Gets or sets close button text + /// /// public string? CloseButtonText { get; set; } /// - /// 获得/设置 保存按钮图标,默认为 null 使用当前主题图标 - /// Gets or sets save button icon. Default is null (use current theme icon) + /// /// public string? SaveButtonIcon { get; set; } /// - /// 获得/设置 保存按钮文本 - /// Gets or sets save button text + /// /// public string? SaveButtonText { get; set; } /// - /// 获得/设置 EditDialog Body 模板 - /// Gets or sets EditDialog Body template + /// /// public RenderFragment? DialogBodyTemplate { get; set; } /// - /// 获得/设置 EditDialog Footer 模板 - /// Gets or sets EditDialog Footer template + /// /// public RenderFragment? DialogFooterTemplate { get; set; } /// - /// 获得 编辑项集合 - /// Gets edit items collection + /// /// public IEnumerable? Items { get; set; } /// - /// 获得/设置 关闭弹窗回调方法 - /// Gets or sets close dialog callback method + /// /// public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 保存回调委托 - /// Gets or sets save callback delegate + /// /// public Func>? OnEditAsync { get; set; } } diff --git a/src/BootstrapBlazor/Extensions/TableEditDialogOptionExtensions.cs b/src/BootstrapBlazor/Extensions/TableEditDialogOptionExtensions.cs index 119cb6e993b..17d4cacee04 100644 --- a/src/BootstrapBlazor/Extensions/TableEditDialogOptionExtensions.cs +++ b/src/BootstrapBlazor/Extensions/TableEditDialogOptionExtensions.cs @@ -36,6 +36,7 @@ public static class TableEditDialogOptionExtensions [nameof(EditDialog.SaveButtonIcon)] = option.SaveButtonIcon, [nameof(EditDialog.Model)] = option.Model, [nameof(EditDialog.DisableAutoSubmitFormByEnter)] = option.DisableAutoSubmitFormByEnter, + [nameof(EditDialog.LabelWidth)] = option.LabelWidth, [nameof(EditDialog.BodyTemplate)] = option.DialogBodyTemplate, [nameof(EditDialog.FooterTemplate)] = option.DialogFooterTemplate, [nameof(EditDialog.OnSaveAsync)] = new Func>(async context => diff --git a/test/UnitTest/Components/TableDialogTest.cs b/test/UnitTest/Components/TableDialogTest.cs index 37eba0d331c..f01d9ceff77 100644 --- a/test/UnitTest/Components/TableDialogTest.cs +++ b/test/UnitTest/Components/TableDialogTest.cs @@ -37,6 +37,7 @@ public async Task EditAsync_Ok() pb.Add(a => a.EditDialogItemsPerRow, 2); pb.Add(a => a.EditDialogRowType, RowType.Inline); pb.Add(a => a.EditDialogLabelAlign, Alignment.Center); + pb.Add(a => a.EditDialogLabelWidth, 200); pb.Add(a => a.IsMultipleSelect, true); pb.Add(a => a.ShowToolbar, true); pb.Add(a => a.TableColumns, foo => builder => @@ -75,6 +76,7 @@ public async Task EditAsync_Ok() cut.Contains("modal-lg"); cut.DoesNotContain("btn-maximize"); cut.Contains("is-draggable"); + cut.Contains("--bb-row-label-width: 200px;"); // 编辑弹窗逻辑 var form = cut.Find(".modal-body form"); diff --git a/test/UnitTest/Components/TableDrawerTest.cs b/test/UnitTest/Components/TableDrawerTest.cs index 21c2fe7f445..2c6fffd0db6 100644 --- a/test/UnitTest/Components/TableDrawerTest.cs +++ b/test/UnitTest/Components/TableDrawerTest.cs @@ -275,4 +275,13 @@ public async Task EditAsync_Ok() queryButton = cut.Find(".fa-magnifying-glass"); await cut.InvokeAsync(() => queryButton.Click()); } + + [Fact] + public void TableEditDrawerOption_Ok() + { + var option = new TableEditDrawerOption(); + option.ShowLabel = false; + + Assert.False(option.ShowLabel); + } }