Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useAntdTable 结合表单校验通过tableProps获取到的pagination始终是默认值? #2287

Closed
javascript-wei opened this issue Aug 9, 2023 · 1 comment · Fixed by #2299
Assignees
Labels
bug Something isn't working

Comments

@javascript-wei
Copy link

如下图,如果在表单中添加rules检验拿到的pagination始终为默认值:current:1,pageSize:10?
预期值:current:2,pageSize:100
地址:https://codesandbox.io/s/vigilant-microservice-w7h439?file=/App.tsx

微信截图_20230809184527
微信截图_20230809184552

@hchlq
Copy link
Collaborator

hchlq commented Aug 21, 2023

原因:初始化时 useAntdTable 做了校验,校验失败了,导致没有请求数据,从而丢掉了 defaultParams

解决方案:短期先去掉 rules 或者提供一个默认值,后续代码修复

@hchlq hchlq self-assigned this Aug 21, 2023
@hchlq hchlq added the bug Something isn't working label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants