Skip to content

Table hover and click outside fixes #11737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2025

Conversation

bosiraphael
Copy link
Contributor

@bosiraphael bosiraphael commented Apr 25, 2025

Table hover and click outside fixes

This PR improves table interaction behavior by refining cell hover states and click-outside handling in the record table component.

Changes

Click Outside Handling

  • Removed conditional rendering of RecordTableBodyFocusClickOutsideEffect

Hover State Management

Implemented hover state cleanup in multiple components:

  • Added recordTableHoverPosition state reset in useLeaveTableFocus hook
  • Integrated mouse leave handler in RecordTableBodyDroppable to clear hover position

Fixes double focus bug

  • Reset the focus and the hover when the table data changes

Videos

Before

Enregistrement.de.l.ecran.2025-04-25.a.15.01.05.mov

After

Enregistrement.de.l.ecran.2025-04-25.a.15.00.04.mov

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR enhances table interaction behavior by improving hover state management and click-outside handling in the record table component.

  • Added hover state cleanup in useLeaveTableFocus.ts by resetting recordTableHoverPositionComponentState to null when focus is lost
  • Implemented onMouseLeave handler in RecordTableBodyDroppable.tsx to clear hover position when mouse leaves table body
  • Removed conditional rendering of RecordTableBodyFocusClickOutsideEffect in RecordTableBodyEffectsWrapper.tsx to ensure click-outside handling is always active

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@lucasbordeau lucasbordeau self-requested a review April 25, 2025 13:05
@lucasbordeau
Copy link
Contributor

Un piccolo regalo

Enregistrement.de.l.ecran.2025-04-25.a.15.08.53.mov

Copy link
Contributor

github-actions bot commented Apr 25, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:61645

This environment will automatically shut down when the PR is closed or after 5 hours.

@ijreilly ijreilly merged commit 5207836 into main Apr 25, 2025
54 of 58 checks passed
@ijreilly ijreilly deleted the r--fix-cell-hover-and-table-click-outside branch April 25, 2025 14:50
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.

4 participants