react-component / react-component/table
rc-table with resize and scroll props lags between the header and the body
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 618
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 2
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
- Note: I have seen a few similar issues with many rows and performance, but none specifically for resizing.
Reproduction link
Steps to reproduce
- Use Ant Table (or the rc-table directly), with code to implement the column resize behavior and scroll y.
- Try to resize the column
- The more rows rendered, the more the problem is noticeable.
What is expected?
No performance issues. Header cell widths and row columns widths stay the same.
What is actually happening?
There is noticeable lag of the header cells and desync between header widths and row widths.
| Environment | Info |
|---|---|
| antd | 4.6.1 |
| React | 16.12.0 |
| System | Mac OS X |
| Browser | Chrome 84.0.4147.125 |
From investigating, when the scroll y prop and column widths are updated, every row in the table is re-rendered when the column is resized.
Copied from https://github.com/ant-design/ant-design/issues/26475.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CodeSandbox reproduction at src/App.js and observe resizing with scroll y and many rows. Trace how column widths and scroll updates cause rows to re-render, then verify that resizing keeps header and body widths synchronized without noticeable lag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100