ant-design / ant-design/pro-components
🐛[BUG] Pro-Table: useFetchData.js:239 Uncaught (in promise) Error: TypeError: can't convert undefined to object
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🐛 bug 描述
点击翻页(后端请求翻页结果),无响应,在console里报错“Uncaught (in promise) Error: TypeError: can't convert undefined to object”
具体报错内容:
Uncaught (in promise) Error: TypeError: can't convert undefined to object
_callee$ useFetchData.js:239
Babel 9
fetchList2 useFetchData.js:256
_callee2$ useFetchData.js:285
Babel 7
fetchListDebounce useFetchData.js:333
useRefFunction2 index.js:11
_callee$ index.js:44
Babel 7
setTimeout handler*useDebounceFn/_callee2/_callee2$/< index.js:38
_callee2$ index.js:37
Babel 7
useFetchData5 useFetchData.js:410
React 5
unstable_runWithPriority scheduler.development.js:468
React 3
workLoop scheduler.development.js:417
flushWork scheduler.development.js:390
performWorkUntilDeadline scheduler.development.js:157
js scheduler.development.js:180
js scheduler.development.js:645
__require2 chunk-IKJM6GHQ.js:18
js index.js:6
__require2 chunk-IKJM6GHQ.js:18
React 2
__require2 chunk-IKJM6GHQ.js:18
js React
__require2 chunk-IKJM6GHQ.js:18
renderer.js:49
[useFetchData.js:239:18](http://localhost:3333/node_modules/@ant-design/pro-table/es/useFetchData.js)
Babel 6
(异步:setTimeout handler)
useDebounceFn/_callee2/_callee2$/< index.js:38
_callee2$ index.js:37
Babel 7
useFetchData5 useFetchData.js:410
React 5
unstable_runWithPriority scheduler.development.js:468
React 3
workLoop scheduler.development.js:417
flushWork scheduler.development.js:390
performWorkUntilDeadline scheduler.development.js:157
(异步:EventHandlerNonNull)
js scheduler.development.js:180
js scheduler.development.js:645
__require2 chunk-IKJM6GHQ.js:18
js index.js:6
__require2 chunk-IKJM6GHQ.js:18
React 2
__require2 chunk-IKJM6GHQ.js:18
js React
__require2 chunk-IKJM6GHQ.js:18
renderer.js:49
### 📷 复现步骤
点击翻页或切换页面大小(即变更单页条目数)。
### 🏞 期望结果
正常请求并返回翻页结果。
### 💻 复现代码
### © 版本信息
- ProComponents 版本: 2.6.10
- ProTable 版本:3.10.4
- umi 版本:@umijs/use-params@1.0.9,@umijs/route-utils@4.0.1,@umijs/use-params@1.0.9
- Firefox,Chrome
- Windows,Ubuntu
### 🚑 其他信息
使用2.5.11版本的pro-components是可以的,其包含的pro-table版本为3.7.11。
Contributor guide
Research direction
Start by reproducing pagination and page-size changes in ProTable 3.10.4, then inspect useFetchData.js around lines 239, 256, 285, 333, and 410 where the reported stack trace enters. Compare the behavior with ProComponents 2.5.11/ProTable 3.7.11; done means pagination requests return results without the undefined-object error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100