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

Fix an issue where column resize may not result in cells (#533) #535

Closed
wants to merge 1 commit into from

Conversation

wcjordan
Copy link
Member

Description

When cell props change while a scroll is happening they don't cause cell's to re-render as expected.
In the issue #533 the resize also causes a horizontal scroll which leads to this issue.

Motivation and Context

See #533

How Has This Been Tested?

Replicated the codepen from the linked issue with our ResizeExample. Reproduced and fixed there.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

This happens if the resize also causes a scroll
@wcjordan
Copy link
Member Author

@pradeepnschrodinger do you think we should cut a 1.1.1 for this or wait for 1.2?

@@ -108,8 +108,8 @@ class FixedDataTableCell extends React.Component {
return true;
}

const { cell: oldCell, isScrolling: oldIsScrolling, ...oldProps } = this.props;
const { cell: newCell, isScrolling: newIsScrolling, ...newProps } = nextProps;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this so that when we stop scrolling we will re-render. What could happen before is other prop changes while scrolling would be dropped and we weren't re-rendering once the scroll stopped.

@wcjordan wcjordan closed this May 27, 2020
@wcjordan wcjordan deleted the fix-column-resize-issue533 branch May 27, 2020 13:32
@wcjordan
Copy link
Member Author

Replaced by #538 so we can target v1.1

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.

None yet

2 participants