Browse Source
Refactor lookupItems initialization with collection expression
pull/23883/head
maliming
8 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
9 additions and
6 deletions
-
framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/LookupExtensionProperty.razor.cs
|
|
|
@ -32,14 +32,17 @@ public partial class LookupExtensionProperty<TEntity, TResourceType> |
|
|
|
var text = Entity.GetProperty(TextPropertyName); |
|
|
|
if (value != null && text != null) |
|
|
|
{ |
|
|
|
lookupItems.Add(new SelectItem<object> |
|
|
|
{ |
|
|
|
Text = Entity.GetProperty(TextPropertyName)!.ToString()!, |
|
|
|
Value = value |
|
|
|
}); |
|
|
|
lookupItems = |
|
|
|
[ |
|
|
|
new SelectItem<object>() |
|
|
|
{ |
|
|
|
Text = Entity.GetProperty(TextPropertyName)!.ToString()!, |
|
|
|
Value = value |
|
|
|
} |
|
|
|
]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected async override Task OnAfterRenderAsync(bool firstRender) |
|
|
|
{ |
|
|
|
await base.OnAfterRenderAsync(firstRender); |
|
|
|
|