-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Handle column sorting events directly on the header cell #3316
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3316 +/- ##
==========================================
+ Coverage 83.54% 83.75% +0.21%
==========================================
Files 45 45
Lines 4588 4568 -20
Branches 719 717 -2
==========================================
- Hits 3833 3826 -7
+ Misses 755 742 -13
|
src/HeaderCell.tsx
Outdated
|
||
if (offset > 11) { | ||
// +1px to account for the border size | ||
return; | ||
} | ||
|
||
// prevent selecting/sorting if we started resizing the column, including double-clicking | ||
ignoreClickRef.current = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not use a ref currently. Is there a bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, after resizing the column, the click
event is triggered on the header cell.
This wasn't an issue before as the click
event handler was on a child element
* Handle column sorting events directly on the header cell * fix main styles * add resize handler element * rm newline
No description provided.