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

List crash when pagination pageSize is undefined #39496

Closed
blluv opened this issue Dec 12, 2022 · 3 comments · Fixed by #39681
Closed

List crash when pagination pageSize is undefined #39496

blluv opened this issue Dec 12, 2022 · 3 comments · Fixed by #39681

Comments

@blluv
Copy link

blluv commented Dec 12, 2022

Reproduction link

Edit on CodeSandbox

Steps to reproduce

<List
...
  pagination={{
    pageSize: undefined
  }}
...
/>

What is expected?

Not crush

What is actually happening?

TypeError
Cannot read properties of undefined (reading 'pageSize')

Environment Info
antd 5.0.6
React 18.3.0
System MacOs Ventura 13.0.1
Browser Chrome 108.0.5359.71
@github-actions
Copy link
Contributor

You may look for issues:

  1. 56% Pagination without last page control #38156

🤖 By issues-similarity-analysis

@BoyYangzai
Copy link
Contributor

why you want to set the pageSize: undefined? this scene is weird😂

@blluv
Copy link
Author

blluv commented Dec 18, 2022

This is because the behavior is different from the table and crashes before receive api response.
https://codesandbox.io/s/sweet-glade-7n64r8

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 a pull request may close this issue.

3 participants