diff --git a/src/SortableList.js b/src/SortableList.js index 78cd576..5d943d1 100644 --- a/src/SortableList.js +++ b/src/SortableList.js @@ -117,7 +117,6 @@ export default class SortableList extends Component { if (data && nextData && !shallowEqual(data, nextData)) { nextOrder = nextOrder || Object.keys(nextData) - uniqueRowKey.id++; this._rowsLayouts = {}; nextOrder.forEach((key) => { this._rowsLayouts[key] = new Promise((resolve) => { @@ -125,6 +124,10 @@ export default class SortableList extends Component { }); }); + if (Object.keys(nextData).length >= Object.keys(data).length) { + uniqueRowKey.id++; + } + if (Object.keys(nextData).length > Object.keys(data).length) { this.setState({ animated: false,