Skip to content

Conversation

eradman
Copy link
Collaborator

@eradman eradman commented Aug 22, 2024

What type of PR is this?

  • Bug Fix

Description

Only set scroll.x when more than one fixed column is set to preserve text wrapping. Unset .ant-table-content overflow property to ensure virtical scrolling works.

How is this tested?

  • Manually

Related Tickets & Documents

#7127

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

fixed_columns.mov

@eradman

This comment was marked as outdated.

Only set scroll.x when more than one fixed column is set to preserve text
wrapping.

Unset .ant-table-content overflow property to ensure virtical scrolling works.
@eradman eradman force-pushed the fixed-column-v-scroll branch from 0133d94 to b319401 Compare August 22, 2024 17:17
@eradman
Copy link
Collaborator Author

eradman commented Aug 22, 2024

Latest failure

  1) Table
       Fixing columns
         fixes the correct number of columns:

    CypressError: Timed out retrying after 20000ms: `cy.scrollTo()` failed because this element is not scrollable:

`<div class="ant-table-content" style="overflow: auto hidden;">...</div>`

Make sure you're targeting the correct element or use `{ensureScrollable: false}` to disable the scrollable check.

https://on.cypress.io/scrollto

The inline style seems to be set by antd. Overriding this with a stylesheet works, but Cyrpess doesn't like it

@justinclift
Copy link
Member

Should we instead revert #7019, and look for a different way to implement it that doesn't break vertical scrolling?

@eradman
Copy link
Collaborator Author

eradman commented Aug 23, 2024

Should we instead revert #7019, and look for a different way to implement it that doesn't break vertical scrolling?

We might have to. It's possible that this behavior was fixed/changed in a later version of antd.

I proposed a revert commit in #7131

@eradman
Copy link
Collaborator Author

eradman commented Aug 26, 2024

The fixed column featurew as reverted in #7131, next step is to propose this feature as a new PR

@eradman eradman closed this Aug 26, 2024
@eradman eradman deleted the fixed-column-v-scroll branch September 16, 2024 14:08
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 this pull request may close these issues.

2 participants