ant-design-blazor/components/table/ActionColumn.razor.cs

26 lines
578 B
C#

using Microsoft.AspNetCore.Components;
namespace AntDesign
{
public partial class ActionColumn : ColumnBase
{
[CascadingParameter(Name = "AntDesign.Column.Blocked")]
public bool Blocked { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
if (IsHeader)
{
Context.HeaderColumnInitialed(this);
}
}
protected override bool ShouldRender()
{
if (Blocked) return false;
return true;
}
}
}