Draft
Conversation
if it's being resized too much (below it's min width which is 40px)
✅ Deploy Preview for react-datasheet-grid canceled.
|
apparently shifted by 2px resize handles to the right caused horizontal scroll in outerRef to appear
tdonkena
approved these changes
May 15, 2024
maxkuzmin
reviewed
May 16, 2024
src/style.css
Outdated
|
|
||
| .dsg-resize-handle:hover { | ||
| cursor: col-resize; | ||
| background: rgba(0, 0, 250, 0.75); |
There was a problem hiding this comment.
it should use --dsg-selection-border-color var instead of hardcoded color
maxkuzmin
reviewed
May 16, 2024
| > Type: `({ widths: Array<number | undefined>) => void`<br /> | ||
| > Default: `void` | ||
|
|
||
| If provided, the grid will became resizable. This callback is called when the user resizes a column. |
There was a problem hiding this comment.
I think we need to have additional boolean flag which enables resizing. One would use resizing without need for handling it.
maxkuzmin
reviewed
May 16, 2024
| Called when the selection changes. Called with null when the grid is blurred. | ||
|
|
||
| ### onColumnsResize | ||
| > Type: `({ widths: Array<number | undefined>) => void`<br /> |
|
@nick-keller Can this get reviewed and merged please, this has been open for 2 months |
chinonso-opti
approved these changes
Jul 30, 2024
abubakir1997
approved these changes
Jan 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds possibility to resize columns with with two callbacks: for tracking resize (dragging) and resize end useful for storing which columns were resized. Stored values then can be passed as a property so that after reloading the page the table will restore touched column widths.
What is done:
If you would like to test it out right away, you can try my fork published on npm:
npm i @mir4a/react-datasheet-grid@4.12.0-alpha.15 --save-exact.