Browse Source
Merge pull request #24412 from abpframework/auto-merge/rel-10-0/4202
Merge branch dev with rel-10.0
pull/24413/head
Ma Liming
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
10 additions and
1 deletions
-
framework/src/Volo.Abp.BlazoriseUI/Components/DataGridEntityActionsColumn.razor.cs
|
|
@ -23,7 +23,16 @@ public partial class DataGridEntityActionsColumn<TItem> : DataGridColumn<TItem> |
|
|
Caption = UiLocalizer["Actions"]; |
|
|
Caption = UiLocalizer["Actions"]; |
|
|
Width = "150px"; |
|
|
Width = "150px"; |
|
|
Sortable = false; |
|
|
Sortable = false; |
|
|
Field = typeof(TItem).GetProperties().First().Name; |
|
|
Field = ResolveFieldName(); |
|
|
|
|
|
|
|
|
return ValueTask.CompletedTask; |
|
|
return ValueTask.CompletedTask; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected virtual string ResolveFieldName() |
|
|
|
|
|
{ |
|
|
|
|
|
var props = typeof(TItem).GetProperties(); |
|
|
|
|
|
return props.Length > 0 |
|
|
|
|
|
? props[0].Name |
|
|
|
|
|
: "Id"; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|