Skip to content

Commit d97e6a4

Browse files
committed
refactor: 重构代码
1 parent fe1bc46 commit d97e6a4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,14 @@ private static bool GetShownColumns(ITableColumn col, IEnumerable<string>? invis
109109
/// <returns></returns>
110110
public override IEnumerable<IDynamicObject> GetItems()
111111
{
112-
if (!UseCache)
112+
if (UseCache)
113113
{
114-
Items = null;
114+
Items ??= BuildItems();
115+
}
116+
else
117+
{
118+
Items = BuildItems();
115119
}
116-
Items ??= BuildItems();
117120
return Items;
118121
}
119122

0 commit comments

Comments
 (0)