aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

QuickGrid: Add EventCallback<TGridItem> for clicking on a row.

Open MattyLeslie opened this issue 1 year ago • 4 comments

QuickGrid: Add EventCallback<TGridItem> for clicking on a row.

Description: This pull request aims to enhance the QuickGrid component by adding the capability to handle row click events. This feature allows developers to perform specific actions when a user clicks on a row in the grid, such as navigating to a detailed view of the selected item.

Changes made:

  1. Introduced EventCallback Parameter
  2. Updated the RenderRow method to include an @onclick event handler that triggers the OnRowClicked callback.
  3. Modified the SampleQuickGridComponent to demonstrate the usage of the OnRowClicked event callback.
  4. Added E2E test to validify the changes using SampleQuickGridComponent

Fixes #44899

MattyLeslie avatar May 23 '24 10:05 MattyLeslie

Thanks very much for submitting this, @MattyLeslie! Mostly what you've done looks great, and it's particularly good you added the E2E test. Hopefully we will be able to include this, though it just requires one main change for perf reasons since QuickGrid really tries hard to max out on perf whenever possible - see other comment.

SteveSandersonMS avatar Jun 17 '24 10:06 SteveSandersonMS

@SteveSandersonMS Thank you for the review! Really appreciate the detail. At first glance the feedback is making sense, I'll need a bit of time to make the changes.

MattyLeslie avatar Jun 18 '24 07:06 MattyLeslie

Might be a nice idea to also check or see which column was the trigger. Since in a lot of tables there is a "actions" columns with some dropdowns etc in it, then we do not want to handle the OnClick of the row but do something different.

vertonghenb avatar Nov 16 '24 23:11 vertonghenb

Is this still under consideration @SteveSandersonMS ?

lewing avatar Jan 22 '25 04:01 lewing

Hi @MattyLeslie. It seems you haven't touched this PR for the last two weeks. To avoid accumulating old PRs, we're marking it as stale. As a result, it will be closed if no further activity occurs within 4 days of this comment. You can learn more about our Issue Management Policies here.