diff --git a/lib/AbsoluteGrid.jsx b/lib/AbsoluteGrid.jsx index d5d38d4..699ccee 100644 --- a/lib/AbsoluteGrid.jsx +++ b/lib/AbsoluteGrid.jsx @@ -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} diff --git a/lib/BaseDisplayObject.jsx b/lib/BaseDisplayObject.jsx index 3bcb567..83b9340 100644 --- a/lib/BaseDisplayObject.jsx +++ b/lib/BaseDisplayObject.jsx @@ -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); } }