diff --git a/Havit.Blazor.Components.Web.Bootstrap/Grids/HxGrid.razor b/Havit.Blazor.Components.Web.Bootstrap/Grids/HxGrid.razor
index 4122bfe7..1acf4a49 100644
--- a/Havit.Blazor.Components.Web.Bootstrap/Grids/HxGrid.razor
+++ b/Havit.Blazor.Components.Web.Bootstrap/Grids/HxGrid.razor
@@ -105,6 +105,24 @@
+ @{
+ RenderFragment placeholderRowTemplate = (int rowIndex) =>
+ @
+
+ @foreach (IHxGridColumn column in columnsToRender)
+ {
+ // same as above this else section
+ GridCellTemplate cellTemplate = column.GetItemPlaceholderCellTemplate(new GridPlaceholderCellContext { Index = rowIndex });
+
+ @cellTemplate.Template
+ |
+ }
+
;
+ }
+
@if (shouldRenderData)
{
@@ -152,22 +170,6 @@
}
;
- RenderFragment placeholderRowTemplate = (PlaceholderContext context) =>
- @
-
- @foreach (IHxGridColumn column in columnsToRender)
- {
- // same as above this else section
- GridCellTemplate cellTemplate = column.GetItemPlaceholderCellTemplate(new GridPlaceholderCellContext { Index = context.Index });
-
- @cellTemplate.Template
- |
- }
-
;
-
@if (ContentNavigationModeEffective == GridContentNavigationMode.InfiniteScroll)
{
@@ -175,7 +177,7 @@
@rowTemplate(context)
- @placeholderRowTemplate(placeholderContext)
+ @placeholderRowTemplate(placeholderContext.Index)
}
@@ -198,7 +200,7 @@
for (int i = 0; i < rowsToRender; i++)
{
GridPlaceholderCellContext placeholderContext = new GridPlaceholderCellContext { Index = pageOffset + i };
- @placeholderRowTemplate(placeholderContext)
+ @placeholderRowTemplate(placeholderContext.Index)
}
}
else