-
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
Move drag handle outside the cell #3334
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3334 +/- ##
==========================================
- Coverage 83.38% 83.09% -0.30%
==========================================
Files 47 47
Lines 4910 4932 +22
Branches 752 757 +5
==========================================
+ Hits 4094 4098 +4
- Misses 816 834 +18
|
src/DragHandle.tsx
Outdated
gridColumnStart: column.idx + 1, | ||
gridRowStart, | ||
insetInlineStart: | ||
column.frozen && typeof column.width === 'number' |
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.
Not sure if this can cause any issues
function getDragHandle(rowIdx: number) { | ||
if (selectedPosition.rowIdx !== rowIdx || selectedPosition.mode === 'EDIT' || onFill == null) { | ||
function renderDragHandle() { | ||
if ( |
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.
Do we need to check whether the selected cell is not in a summary row?
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.
isCellWithinViewportBounds
would return false for header and summary rows. There is another function isCellWithinSelectionBounds
that can be used to check header and summary rows as well
Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
* Move drag handle outside the cell * alternate approach * revert * Remove margin * Fix drag handle position on frozen column * Fix typo * Fix colSpan * Simplify styles * Update src/DragHandle.tsx Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com> * Update src/DataGrid.tsx Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com> * Fix if condition --------- Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
Pros:
Cons