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

Column key is regenerated automatically even if key is already defined #85

Merged
merged 1 commit into from
Nov 28, 2016

Conversation

ihorkrys
Copy link
Contributor

@ihorkrys ihorkrys commented Nov 28, 2016

See issue #84

Description

Changed generation key for Cell. For now we using columnKey as key when columnKey provided in props

Motivation and Context

Cell was recreated each time after changing key(after hiding). Now it is only update

How Has This Been Tested?

It is tested on example in Chrome

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.

@@ -82,7 +82,7 @@ var FixedDataTableCellGroupImpl = React.createClass({
if (!recycable || (
currentPosition - props.left <= props.width &&
currentPosition - props.left + columnProps.width >= 0)) {
var key = 'cell_' + i;
var key = columnProps.columnKey || 'cell_' + i;
Copy link
Contributor

Choose a reason for hiding this comment

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

@wcjordan There was discussion of adding a unique check for column keys. Do we still want to include that?

Copy link
Member

Choose a reason for hiding this comment

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

Naw, I was afraid we were breaking backwards compatibility. But if we already have a documented requirement that column keys are unique, then no need.

@KamranAsif
Copy link
Contributor

LGTM

@KamranAsif KamranAsif merged commit c3fb4c4 into schrodinger:master Nov 28, 2016
@wcjordan wcjordan mentioned this pull request Feb 6, 2017
7 tasks
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

3 participants