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

Fixing column drag scroll with cell recycling #40

Merged
merged 3 commits into from
Aug 3, 2016

Conversation

KamranAsif
Copy link
Contributor

Description

Fix column drag and reorder when allowCellRecycling is enabled. This was causing issues because the original cell that the event started on was being destroyed.

Motivation and Context

#39
SS-16510

How Has This Been Tested?

Tested locally with reorder example

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.

@@ -64,7 +64,7 @@ var FixedDataTableCellDefault = React.createClass({
},

render() {
var {height, width, style, className, children, columnKey, ...props} = this.props;
var {height, width, style, className, children, columnKey, rowIndex, ...props} = this.props;
Copy link
Member

Choose a reason for hiding this comment

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

Interesting destructing to remove props...
Confused me for a second so might be worth adding a comment as to why it's done. Maybe this is just a common pattern I haven't seen yet though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wcjordan
Copy link
Member

wcjordan commented Aug 3, 2016

lgtm, thanks for the quick turn around!

@wcjordan
Copy link
Member

wcjordan commented Aug 3, 2016

new change lgtm. Why was that necessary to add? Was that missed from the column drag scroll feature previously?

@KamranAsif
Copy link
Contributor Author

Yeah it should have been included before. I noticed it in LD because we have a separate component for the header and we sync the horizontal scroll via the callback

@KamranAsif KamranAsif merged commit 5e11477 into schrodinger:master Aug 3, 2016
@KamranAsif KamranAsif deleted the FixDragRecycling branch August 3, 2016 20:52
@KamranAsif KamranAsif mentioned this pull request Aug 3, 2016
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