Skip to content

Commit

Permalink
Don't use internal key attr. It will not be passed in props.
Browse files Browse the repository at this point in the history
  • Loading branch information
okonet committed Nov 11, 2015
1 parent d0544c6 commit ca804e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/AbsoluteGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default class AbsoluteGrid extends React.Component {
style={style}
item={item}
index={index}
id={key}
key={key}
itemsLength={this.props.items.length}
dragEnabled={this.props.dragEnabled}
Expand Down
2 changes: 1 addition & 1 deletion lib/BaseDisplayObject.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class BaseDisplayObject extends React.Component {
if (this.props.dragEnabled) {
this.domNode.addEventListener('mousedown', this.onDrag);
this.domNode.addEventListener('touchstart', this.onDrag);
this.domNode.setAttribute('data-key', this.props.key);
this.domNode.setAttribute('data-key', this.props.id);
}
}

Expand Down

0 comments on commit ca804e6

Please sign in to comment.