kendo-react
kendo-react copied to clipboard
[TaskBoard] OnChange event does not show previous item position
In the onChange event, both event.item.id and event.item.previousItem.id show the current id of the item. However, previousItem.id should be showing the id before the change - https://stackblitz.com/edit/react-omgmbq?file=app%2Fmain.jsx
As a workaround, you can get the previous item position by adding the following code in the onChange event:
return x.status === event.item.status;
});
const newOrder =
allItemsAtDroppedStatus.findIndex((x) => {
return x.id === event.item.id;
}) + 1;
console.log(newOrder);
https://stackblitz.com/edit/react-omgmbq-qecsza?file=app%2Fmain.jsx
Reported in Ticket ID: 1621301
Reported in Ticket ID: 1644635
The issue has been fixed in our development version 8.2.1-develop.5.