Working with react table and requirement is to make the rows draggable. Below is the short view of my code.
<DragDropContext onDragEnd={onDragEnd} onDragUpdate={onDragUpdate}>
<Droppable droppableId="droppable">
{(provided) => (
<TableBody {...provided.droppableProps} ref={provided.innerRef}>
{inventory.map((row, index) => (
<Draggable key={row.accountId} draggableId={row.accountId.toString()}
index={index}>
{(provided, snapshot) => (
<TableRow ref={provided.innerRef} {...provided.draggableProps}
style={getItemStyle(snapshot.isDragging,
provided.draggableProps.style)}>
I am getting result.destination as null in onDragEnd method. What's going wrong here?