mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 08:51:27 +08:00
feat(module: table): add support for Display attribute (#1310)
feat(module:table): add support for Display attribute Display attribute is widely used to specify display text for entity properties. Table component should get column names from Display attribute instances. Closes #1278
This commit is contained in:
parent
3da9e703fa
commit
c06e73ba5b
@ -21,7 +21,9 @@ namespace AntDesign.Core.Reflection
|
||||
{
|
||||
this.PropertyInfo = propertyInfo;
|
||||
this.RequiredAttribute = propertyInfo.GetCustomAttribute<RequiredAttribute>(true);
|
||||
this.DisplayName = propertyInfo.GetCustomAttribute<DisplayNameAttribute>(true)?.DisplayName ?? propertyInfo.Name;
|
||||
this.DisplayName = propertyInfo.GetCustomAttribute<DisplayNameAttribute>(true)?.DisplayName ??
|
||||
propertyInfo.GetCustomAttribute<DisplayAttribute>(true)?.Name ??
|
||||
propertyInfo.Name;
|
||||
this.PropertyName = PropertyInfo.Name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user