mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
fix(reorder-group): revert item to original position when passing false to complete (#21396)
fixes #19128
This commit is contained in:
@ -219,7 +219,7 @@ export class ReorderGroup implements ComponentInterface {
|
|||||||
const toIndex = this.lastToIndex;
|
const toIndex = this.lastToIndex;
|
||||||
const fromIndex = indexForItem(selectedItemEl);
|
const fromIndex = indexForItem(selectedItemEl);
|
||||||
|
|
||||||
if (toIndex !== fromIndex && (!listOrReorder || listOrReorder === true)) {
|
if (toIndex !== fromIndex && (listOrReorder === undefined || listOrReorder === true)) {
|
||||||
const ref = (fromIndex < toIndex)
|
const ref = (fromIndex < toIndex)
|
||||||
? children[toIndex + 1]
|
? children[toIndex + 1]
|
||||||
: children[toIndex];
|
: children[toIndex];
|
||||||
|
|||||||
Reference in New Issue
Block a user