While using react-beautiful-dnd in my react app I stumble upon an issue.
After reorder a DND list, I end up not being able to move the replaced item since it may not have a draggable id.console message
Thing is the component has a draggable id as it shows in inspector.
inspector
My reorder function is the following
<code>const reorder = (list, startIndex, endIndex) => {
const result = [...list]
const [removed] = result.splice(startIndex, 1)
result.splice(endIndex, 0, removed)
return result
}
</code>
<code>const reorder = (list, startIndex, endIndex) => {
const result = [...list]
const [removed] = result.splice(startIndex, 1)
result.splice(endIndex, 0, removed)
return result
}
</code>
const reorder = (list, startIndex, endIndex) => {
const result = [...list]
const [removed] = result.splice(startIndex, 1)
result.splice(endIndex, 0, removed)
return result
}
Tried to remove Strictmode since it may cause issue when rerender but this did not solve issue.
Any idea would be appreaciated, thanks for reading