Skip to content

Conversation

curly210102
Copy link
Contributor

@curly210102 curly210102 commented Nov 25, 2021

问题描述:设置 scroll.x,resize 或者切换侧边栏时,卡顿明显。Ref: ant-design/ant-design#27775
解决方式:将只在 ExpandedRow 中用到的 fixColumn/fixHeader/componentWidth 单独提取到一个 Context 中
优化结果:固定栏折叠时更改 table 宽度,所需用时 510.4±13.7ms ➜ 104.1±5ms
具体分析#701

@vercel
Copy link

vercel bot commented Nov 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/table/FQiEUnEJCEdNLCgBspkBmz47A22t
✅ Preview: https://table-git-fork-curly210102-performance-e-403530-react-component.vercel.app

@codecov
Copy link

codecov bot commented Nov 26, 2021

Codecov Report

Merging #705 (1ad2ed7) into master (ff2a010) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #705   +/-   ##
=======================================
  Coverage   99.67%   99.67%           
=======================================
  Files          31       32    +1     
  Lines         931      935    +4     
  Branches      284      284           
=======================================
+ Hits          928      932    +4     
  Misses          3        3           
Impacted Files Coverage Δ
src/Body/BodyRow.tsx 97.91% <ø> (ø)
src/context/BodyContext.tsx 100.00% <ø> (ø)
src/Body/ExpandedRow.tsx 100.00% <100.00%> (ø)
src/Body/index.tsx 100.00% <100.00%> (ø)
src/Table.tsx 100.00% <100.00%> (ø)
src/context/ExpandedRowContext.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff2a010...1ad2ed7. Read the comment docs.

@zombieJ zombieJ merged commit fd4091e into react-component:master Nov 26, 2021
@zombieJ
Copy link
Member

zombieJ commented Nov 26, 2021

+ rc-table@7.20.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants