From bd1bd2fc9712f977e9a5497173b341bf7454a1e2 Mon Sep 17 00:00:00 2001 From: gianantoniopini <63844628+gianantoniopini@users.noreply.github.com> Date: Tue, 9 Feb 2021 12:31:54 +0100 Subject: [PATCH] List component, drag handler: added check for source and destination id being the same --- src/components/builder/lists/List.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/builder/lists/List.js b/src/components/builder/lists/List.js index bfe77b9e..51beb336 100644 --- a/src/components/builder/lists/List.js +++ b/src/components/builder/lists/List.js @@ -44,6 +44,10 @@ const List = ({ return; } + if (source.index === destination.index) { + return; + } + const itemsReordered = reorder(items, source.index, destination.index); dispatch({ type: 'on_input',