Issue with antd Table when scroll.x is true
See original GitHub issueCurrent behavior:
The issue is this weird behaviour when scroll={ x: true }
is used on a Antd Table component (https://ant.design/components/table/#API).
The problem is happening only with cypress >= 4.6.0 and when a parameter scroll x is specified. For example:
<Table
loading={this.state.loading}
bordered
size="small"
scroll={{ x: true }}
columns={columns}
dataSource={this.state.data}
pagination={{
pageSize: 5,
hideOnSinglePage: true,
}}
/>
This is the weirdest behaviour.
Desired behavior:
This error should not happen.
Test code to reproduce
Test project: https://github.com/bn3t/cypress-test-table. The test shows 2 use cases:
- Failing test: http://localhost:3000/
- Succeeding test when scroll.x true is not used: http://localhost:3000/no-scroll-x.
Versions
Cypress 4.6.0 >= 0, MacOS, Chrome, Firefox, Edge.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Table Component (scroll.x dynamic) · Issue #10189
My problem is to set the scroll.x to be dynamic. The current implementation is to have a dynamic column and rows, but the...
Read more >Ant Design Table with vertical and horizontal scroll
The sum of unfixed columns should not greater than scroll.x. Right now, the width is fine, Ant Design Table could figure out the...
Read more >antd table scroll x
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >Table
To fix some columns and scroll inside other columns, and you must set scroll.x meanwhile. Specify the width of columns if header and...
Read more >Ant Design Table Horizontal Scroll - Fixed Columns - YouTube
reactjs # antd # table In this video tutorial I have explained how to implement Ant Design Table Horizontal Scroll & Vertical Scroll...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yah, I can recreate this. It has something to do with the combination of scroll: x and the imported
antd/dist/antd.css
.In 4.5.0, you can see the actual error as the
ResizeObserver loop limit exceeded
.Smallest reproducible code is below. Run:
npm start
npm cypress:open
package.json
spec.js
src/index.js
public/index.html
Thanks for the info. It was really confusing because the application does not show any sign of a thrown exception. Only Cypress is getting this error. Furthermore, my real application has several tests with such a table containing the scroll feature. These tests behave correctly in 4.5.0.
Thank you for your help.