Skip to content

Commit 4ccf522

Browse files
committed
Changed css classes assignment in RenderPlaceholderRow
1 parent 74f0f5b commit 4ccf522

File tree

1 file changed

+8
-1
lines changed
  • src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src

1 file changed

+8
-1
lines changed

src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,14 @@
7979
<tr aria-rowindex="@(placeholderContext.Index + 1)">
8080
@foreach (var col in _columns)
8181
{
82-
<td class="grid-cell-placeholder @ColumnClass(col)" @key="@col">@{ col.RenderPlaceholderContent(__builder, placeholderContext); }</td>
82+
var hasCustomPlaceholder = col.PlaceholderTemplate is not null;
83+
var cssClass = hasCustomPlaceholder
84+
? "@ColumnClass(col)"
85+
: "grid-cell-placeholder @ColumnClass(col)";
86+
87+
<td class="@cssClass" @key="@col">
88+
@{ col.RenderPlaceholderContent(__builder, placeholderContext); }
89+
</td>
8390
}
8491
</tr>
8592
}

0 commit comments

Comments
 (0)