8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7703081 commit d2f4751Copy full SHA for d2f4751
src/react-sortable.tsx
@@ -311,6 +311,13 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
311
const newList = [...list].map(item => ({ ...item, selected: false }));
312
evt.newIndicies.forEach(curr => {
313
const index = curr.index;
314
+ if (index === -1) {
315
+ console.log(
316
+ `"${evt.type}" had indice of "${curr.index}", which is probably -1 and doesn't usually happen here.`
317
+ );
318
+ console.log(evt)
319
+ return
320
+ }
321
newList[index].selected = true;
322
});
323
setList(newList, this.sortable, store);
0 commit comments