mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-23 21:21:32 +10:00
List component, drag handler: added check for source and destination id being the same
This commit is contained in:
@ -44,6 +44,10 @@ const List = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (source.index === destination.index) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const itemsReordered = reorder(items, source.index, destination.index);
|
const itemsReordered = reorder(items, source.index, destination.index);
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'on_input',
|
type: 'on_input',
|
||||||
|
|||||||
Reference in New Issue
Block a user