Skip to content

Commit 471f290

Browse files
ArgoZhangcetinbas
andauthored
refactor(ILookup): extension method CreateDisplayByFieldType support ILookup (#4981)
* refactor: 增加自动生成参数赋值逻辑 * chore: bump version 9.2.0-beta01 Co-Authored-By: cetinbas <[email protected]> * chore: bump version 9.2.0-beta02 --------- Co-authored-by: cetinbas <[email protected]>
1 parent 4bc12ae commit 471f290

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/BootstrapBlazor/Utils/Utility.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,12 @@ public static void CreateDisplayByFieldType(this RenderTreeBuilder builder, IEdi
429429
builder.OpenComponent(0, typeof(Display<>).MakeGenericType(fieldType));
430430
builder.AddAttribute(10, nameof(Display<string>.DisplayText), displayName);
431431
builder.AddAttribute(20, nameof(Display<string>.Value), fieldValue);
432-
builder.AddAttribute(30, nameof(Display<string>.LookupServiceKey), item.LookupServiceKey);
433-
builder.AddAttribute(40, nameof(Display<string>.LookupServiceData), item.LookupServiceData);
434-
builder.AddAttribute(50, nameof(Display<string>.Lookup), item.Lookup);
435-
builder.AddAttribute(60, nameof(Display<string>.ShowLabelTooltip), item.ShowLabelTooltip);
432+
builder.AddAttribute(30, nameof(Display<string>.Lookup), item.Lookup);
433+
builder.AddAttribute(30, nameof(Display<string>.LookupService), item.LookupService);
434+
builder.AddAttribute(40, nameof(Display<string>.LookupServiceKey), item.LookupServiceKey);
435+
builder.AddAttribute(50, nameof(Display<string>.LookupServiceData), item.LookupServiceData);
436+
builder.AddAttribute(60, nameof(Display<string>.LookupStringComparison), item.LookupStringComparison);
437+
builder.AddAttribute(65, nameof(Display<string>.ShowLabelTooltip), item.ShowLabelTooltip);
436438
if (item is ITableColumn col)
437439
{
438440
if (col.Formatter != null)
@@ -522,6 +524,7 @@ public static void CreateComponentByFieldType(this RenderTreeBuilder builder, Co
522524
if (item.IsLookup() && item.Items == null)
523525
{
524526
builder.AddAttribute(110, nameof(Select<SelectedItem>.ShowSearch), item.ShowSearchWhenSelect);
527+
builder.AddAttribute(115, nameof(Select<SelectedItem>.Items), item.Lookup);
525528
builder.AddAttribute(120, nameof(Select<SelectedItem>.LookupService), lookupService);
526529
builder.AddAttribute(121, nameof(Select<SelectedItem>.LookupServiceKey), item.LookupServiceKey);
527530
builder.AddAttribute(122, nameof(Select<SelectedItem>.LookupServiceData), item.LookupServiceData);

0 commit comments

Comments
 (0)