Skip to content

Expose DataGrid row clicks through the GUI SDK - #1697

Closed
MinYu5263 wants to merge 1 commit into
DevToys-app:mainfrom
MinYu5263:feature/datagrid-selection-sync
Closed

MinYu5263 wants to merge 1 commit into
DevToys-app:mainfrom
MinYu5263:feature/datagrid-selection-sync

Conversation

@MinYu5263

Copy link
Copy Markdown

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • New feature or enhancement
  • UI change (please include screenshot!)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Internationalization and localization
  • Other (please describe):

What is the current behavior?

The GUI SDK exposes OnRowSelected for selection changes, but does not expose a separate callback for row clicks.

Plugins cannot directly handle every row click, including repeated clicks on the same row, independently of selection changes.

Issue Number: N/A

What is the new behavior?

  • Adds OnRowClick overloads supporting Action<IUIDataGridRow?> and Func<IUIDataGridRow?, ValueTask> callbacks
  • Forwards the clicked row through a native EventCallback and the DataGrid presenter, awaiting asynchronous callbacks
  • Invokes the callback on each row click, including repeated clicks on the same row; programmatic selection and keyboard navigation do not invoke it

Other information

Existing OnRowSelected behavior and selection handling are preserved.

The callback receives the actual clicked row, which may differ from the SDK's SelectedRow. It also works when row selection is disabled.

Validation on Windows:

  • Debug and Release builds succeeded
  • All 150 existing unit tests passed
  • 17 temporary in-memory component checks passed, covering click forwarding, repeated clicks, selection independence, asynchronous completion, and exception propagation

Runtime component checks used Debug builds. Manual UI, accessibility, macOS, and Linux validation were not performed.

Quality check

Before creating this PR:

  • Did you follow the code style guideline as described in CONTRIBUTING.md
  • Did you build the app and test your changes?
  • Did you check for accessibility? On Windows, you can use Accessibility Insights for this.
  • Did you verify that the change work in Release build configuration
  • Did you verify that all unit tests pass
  • If necessary and if possible, did you verify your changes on:
    • Windows
    • macOS
    • Linux

@MinYu5263 MinYu5263 closed this by deleting the head repository Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant