fix(reorder-group): revert item to original position when passing false to complete (#21396)

fixes #19128
This commit is contained in:
Thomas Clark
2020-05-29 19:35:34 +01:00
committed by GitHub
parent 882f8fef07
commit 5f2001c43c

View File

@ -219,7 +219,7 @@ export class ReorderGroup implements ComponentInterface {
const toIndex = this.lastToIndex;
const fromIndex = indexForItem(selectedItemEl);
if (toIndex !== fromIndex && (!listOrReorder || listOrReorder === true)) {
if (toIndex !== fromIndex && (listOrReorder === undefined || listOrReorder === true)) {
const ref = (fromIndex < toIndex)
? children[toIndex + 1]
: children[toIndex];