adazzle / react-data-grid

Feature-rich and customizable data grid React component
https://adazzle.github.io/react-data-grid/
Other
6.93k stars 2.18k forks source link

Resize column via keyboard #3357

Open godon019 opened 1 year ago

godon019 commented 1 year ago

Closes #3320

codecov[bot] commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.21%. Comparing base (fe98d87) to head (e14b606).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3357 +/- ## ======================================= Coverage 98.21% 98.21% ======================================= Files 47 47 Lines 5087 5091 +4 Branches 727 727 ======================================= + Hits 4996 5000 +4 Misses 91 91 ``` | [Files](https://app.codecov.io/gh/adazzle/react-data-grid/pull/3357?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adazzle) | Coverage Δ | | |---|---|---| | [src/DataGrid.tsx](https://app.codecov.io/gh/adazzle/react-data-grid/pull/3357?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adazzle#diff-c3JjL0RhdGFHcmlkLnRzeA==) | `99.34% <100.00%> (+<0.01%)` | :arrow_up: |
kycutler commented 8 months ago

Hi folks, thanks for working on this! Please let me know if I can help at all.

One bit of feedback on the changes so far: ideally resizeColumn and getColumnWidth would be accessible from anywhere and not limited to specific handlers like onCellKeyDown so consumers have flexibility in how it is exposed (for example, column widths could be rendered within the grid and made editable via input elements). Perhaps the methods could be present on the CalculatedColumns themselves, or exposed via imperative handle on the grid?

Thanks for all the work on this fantastic project!