ant-design / ant-design/pro-components
🐛[BUG] keepalive场景下,切换路由所有已加载路由页面里的ProTable会重新渲染一次,影响页面性能
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🐛 bug 描述
keepalive场景下,由于现在ProTable和ProLayout引用的是同一个ProConfigProvider,切换路由时ProLayout重新render,导致ProTable对Provider重新渲染的判断(源码对应isNullProvide)失效,从而使已加载路由页面里所有的ProTable重新渲染一次,影响页面性能。
在老版本ProTable和ProLayout引用不同ProConfigProvider则不会出现该问题。
### © 版本信息
- ProComponents 版本:2.6.43
- umi 版本:4.0.89
- 浏览器环境:Chrome
Contributor guide
Research direction
Read the ProTable, ProLayout, and ProConfigProvider implementations, starting at the isNullProvide logic mentioned in the report. Reproduce the issue by switching routes in a keepalive setup with already loaded ProTable pages. Done means route changes no longer cause every loaded ProTable to render again.
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
- Mostly clear
- Newbie friendliness
- 35/100