From 7e70d60088b2df80172f63f2710ce2ac77e01a2e Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 2 Dec 2025 20:57:02 +0000
Subject: [PATCH 1/3] Initial plan
From bd0fe2b83af009a1615f38a922dabfdd2e7e609f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 2 Dec 2025 21:04:48 +0000
Subject: [PATCH 2/3] Fix RowClassApplied test and consolidate RenderRow logic
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
---
.../src/QuickGrid.razor | 11 +++++++++--
src/Components/test/E2ETest/Tests/QuickGridTest.cs | 4 ++--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor
index f11fca3fa5fc..c34381f1bc08 100644
--- a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor
+++ b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor
@@ -66,9 +66,14 @@
private void RenderRow(RenderTreeBuilder __builder, int rowIndex, TGridItem item)
{
var rowClass = RowClass?.Invoke(item);
+ var combinedClass = OnRowClick.HasDelegate ? $"row-clickable {rowClass}" : rowClass;
+
if (OnRowClick.HasDelegate)
{
-
OnRowClick.InvokeAsync(item))">
+
OnRowClick.InvokeAsync(item))">
@foreach (var col in _columns)
{
| @{ col.CellContent(__builder, item); } |
@@ -77,7 +82,9 @@
}
else
{
-
+
@foreach (var col in _columns)
{
| @{ col.CellContent(__builder, item); } |
diff --git a/src/Components/test/E2ETest/Tests/QuickGridTest.cs b/src/Components/test/E2ETest/Tests/QuickGridTest.cs
index 8eeef99de766..e2994a1eb41f 100644
--- a/src/Components/test/E2ETest/Tests/QuickGridTest.cs
+++ b/src/Components/test/E2ETest/Tests/QuickGridTest.cs
@@ -136,11 +136,11 @@ public void RowClassApplied()
if (firstName == "Julie")
{
isJulieRowFound = true;
- Assert.Equal("highlight", row.GetDomAttribute("class"));
+ Assert.Equal("row-clickable highlight", row.GetDomAttribute("class"));
}
else
{
- Assert.Null(row.GetDomAttribute("class"));
+ Assert.Equal("row-clickable", row.GetDomAttribute("class"));
}
}
From 5b1906d89d465941c04f5f7c1133ff1d96c82851 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 2 Dec 2025 21:06:30 +0000
Subject: [PATCH 3/3] Fix trailing space in combinedClass when rowClass is null
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
---
.../src/QuickGrid.razor | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor
index c34381f1bc08..a6c87173ca11 100644
--- a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor
+++ b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor
@@ -66,7 +66,9 @@
private void RenderRow(RenderTreeBuilder __builder, int rowIndex, TGridItem item)
{
var rowClass = RowClass?.Invoke(item);
- var combinedClass = OnRowClick.HasDelegate ? $"row-clickable {rowClass}" : rowClass;
+ var combinedClass = OnRowClick.HasDelegate
+ ? string.IsNullOrEmpty(rowClass) ? "row-clickable" : $"row-clickable {rowClass}"
+ : rowClass;
if (OnRowClick.HasDelegate)
{