-
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
Update dragHandle to display at the intersection of column and row #3355
Conversation
amanmahajan7
commented
Oct 2, 2023
•
edited
Loading
edited
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3355 +/- ##
==========================================
+ Coverage 82.99% 83.13% +0.14%
==========================================
Files 47 47
Lines 5075 5088 +13
Branches 788 794 +6
==========================================
+ Hits 4212 4230 +18
+ Misses 863 858 -5
|
src/DataGrid.tsx
Outdated
rows={rows} | ||
column={column} | ||
columnWidth={columnWidth} | ||
rowHeight={getRowHeight(rowIdx)} | ||
isLastColumn={column.idx === maxColIdx} |
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.
Can't use idx
here?
What if we the cell spans to the end?
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.
What if we the cell spans to the end?
place-self
fixes it I think. but we still need to handle colSpan on a frozen column 🤔
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.
Hmm, may be not. Checking
insetInlineStart: insetInlineStart | ||
? `calc(${insetInlineStart} + ${columnWidth}px + var(--rdg-drag-handle-size) * -0.5 - 1px)` | ||
: undefined |
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.
What does this do exactly?
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.
It sets the correct left position for the drag handle when it is frozen.
…dazzle#3355) * Hide drag handle if all the cells in a column are readonly * Update dragHandle to display at the intersection of column and row * Fix frozen column * Cleanup * `marginInlineStart` is only needed on unfrozen columns * dedupe * Use idx * Use placeself and negative margins * Remove unused function * Handle colSpan on the last column