Skip to content

Doubleclick table row#86

Merged
joshunrau merged 3 commits intoDouglasNeuroInformatics:mainfrom
david-roper:doubleclick-table-row
Feb 26, 2026
Merged

Doubleclick table row#86
joshunrau merged 3 commits intoDouglasNeuroInformatics:mainfrom
david-roper:doubleclick-table-row

Conversation

@david-roper
Copy link
Contributor

@david-roper david-roper commented Feb 26, 2026

Adds a method to allow rows to be interactive with via double click

Summary by CodeRabbit

  • New Features
    • Added double-click event handling for table rows. Users can now trigger custom actions by double-clicking on rows, enhancing table interactivity and improving user workflows. Developers can easily configure custom callbacks for this feature, which works independently and seamlessly alongside existing row-click functionality, providing more flexible and enhanced row interaction capabilities.

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f7b271 and 05b8cc6.

📒 Files selected for processing (5)
  • src/components/DataTable/DataTable.stories.tsx
  • src/components/DataTable/DataTable.tsx
  • src/components/DataTable/DataTableBody.tsx
  • src/components/DataTable/DataTableContent.tsx
  • src/components/DataTable/types.ts

Walkthrough

Introduces support for row double-click events in the DataTable component by adding an onRowDoubleClick prop. The prop is threaded through the component hierarchy (DataTable → DataTableContent → DataTableBody) and wired to a double-click event handler on data rows. Type definitions and Storybook stories are updated accordingly.

Changes

Cohort / File(s) Summary
DataTable Component Core
src/components/DataTable/DataTable.tsx, src/components/DataTable/DataTableContent.tsx, src/components/DataTable/DataTableBody.tsx
Added onRowDoubleClick prop to component signatures and destructuring. Wired prop through the component tree and attached onDoubleClick handler to data rows, invoking the callback with row data.
Type Definitions
src/components/DataTable/types.ts
Added optional onRowDoubleClick prop to DataTableContentProps<T> with signature matching onRowClick.
Storybook Stories
src/components/DataTable/DataTable.stories.tsx
Added onRowDoubleClick handlers to Default, WithActions, and Grouped stories, displaying row identifiers in alerts on double-click.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

Double-click the dream, no need for a single tap,
Row handlers aligned in a neat, tidy map,
Props thread their way through the component tree,
Events cascade down with harmonic glee! 🎯✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@david-roper david-roper marked this pull request as ready for review February 26, 2026 18:12
@joshunrau joshunrau merged commit 305b650 into DouglasNeuroInformatics:main Feb 26, 2026
1 of 2 checks passed
@github-actions
Copy link

🎉 This PR is included in version 6.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants