Skip to content

Commit ee1f5f5

Browse files
committed
feat: 增加 Select 组件对 LookupService 自动赋值逻辑
1 parent 2069cf3 commit ee1f5f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BootstrapBlazor/Utils/Utility.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ public static void CreateDisplayByFieldType(this RenderTreeBuilder builder, IEdi
459459
/// <param name="item"></param>
460460
/// <param name="changedType"></param>
461461
/// <param name="isSearch"></param>
462-
/// <param name="lookUpService"></param>
463-
public static void CreateComponentByFieldType(this RenderTreeBuilder builder, ComponentBase component, IEditorItem item, object model, ItemChangedType changedType = ItemChangedType.Update, bool isSearch = false, ILookupService? lookUpService = null)
462+
/// <param name="lookupService"></param>
463+
public static void CreateComponentByFieldType(this RenderTreeBuilder builder, ComponentBase component, IEditorItem item, object model, ItemChangedType changedType = ItemChangedType.Update, bool isSearch = false, ILookupService? lookupService = null)
464464
{
465465
var fieldType = item.PropertyType;
466466
var fieldName = item.GetFieldName();
@@ -522,7 +522,7 @@ public static void CreateComponentByFieldType(this RenderTreeBuilder builder, Co
522522
if (item.IsLookup() && item.Items == null)
523523
{
524524
builder.AddAttribute(110, nameof(Select<SelectedItem>.ShowSearch), item.ShowSearchWhenSelect);
525-
builder.AddAttribute(120, nameof(Select<SelectedItem>.LookupService), item.LookupService);
525+
builder.AddAttribute(120, nameof(Select<SelectedItem>.LookupService), lookupService);
526526
builder.AddAttribute(121, nameof(Select<SelectedItem>.LookupServiceKey), item.LookupServiceKey);
527527
builder.AddAttribute(122, nameof(Select<SelectedItem>.LookupServiceData), item.LookupServiceData);
528528
builder.AddAttribute(130, nameof(Select<SelectedItem>.StringComparison), item.LookupStringComparison);

0 commit comments

Comments
 (0)