Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

Add OnRowClick EventCallback to QuickGrid

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Add row click handling to QuickGrid component

Description

Adds OnRowClick parameter to QuickGrid enabling row click event handling.

Changes:

  • OnRowClick parameter of type EventCallback<TGridItem>
  • row-clickable CSS class with cursor: pointer applied when delegate is set
  • E2E tests for callback triggering and cursor styling

Usage:

<QuickGrid Items="@people" OnRowClick="HandleRowClick">
    <PropertyColumn Property="@(p => p.Name)" />
</QuickGrid>

@code {
    void HandleRowClick(Person person) => Console.WriteLine($"Clicked: {person.Name}");
}

Fixes #44899


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@dotnet-policy-service
Copy link
Contributor

Greetings! You've submitted a PR that modifies code that is shared with https://github.com/dotnet/runtime . Please make sure you synchronize this code with the changes in that repo!

Copilot AI and others added 2 commits December 2, 2025 21:04
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copilot AI changed the title [WIP] Add OnRowClick EventCallback to QuickGrid Add OnRowClick EventCallback to QuickGrid Dec 2, 2025
Copilot AI requested a review from javiercn December 2, 2025 21:08
@javiercn javiercn marked this pull request as ready for review December 2, 2025 21:46
@javiercn javiercn requested a review from a team as a code owner December 2, 2025 21:46
@javiercn javiercn merged commit 600f350 into javiercn/quickgrid-row-click-event Dec 2, 2025
16 of 25 checks passed
@javiercn javiercn deleted the copilot/sub-pr-64602 branch December 2, 2025 21:46
javiercn added a commit that referenced this pull request Dec 3, 2025
* Initial plan

* Fix RowClassApplied test and consolidate RenderRow logic

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>

* Fix trailing space in combinedClass when rowClass is null

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
javiercn added a commit that referenced this pull request Dec 4, 2025
* Add OnRowClick EventCallback to QuickGrid

This change adds an OnRowClick parameter to QuickGrid that allows users to handle row click events. When the OnRowClick delegate is set:

- The row receives a 'row-clickable' CSS class
- A cursor: pointer style is applied via scoped CSS
- Clicking the row invokes the callback with the row item

Fixes #44899

* Add OnRowClick EventCallback to QuickGrid (#64606)

* Initial plan

* Fix RowClassApplied test and consolidate RenderRow logic

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>

* Fix trailing space in combinedClass when rowClass is null

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>

* Simplify QuickGrid OnRowClick rendering by removing conditional duplication (#64621)

* Initial plan

* Simplify RenderRow by removing if/else and coalescing OnRowClick callback

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants