Skip to content

Commit e76f8bd

Browse files
committed
style(): update test logs and add TODO
1 parent 7bd6087 commit e76f8bd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/src/components/reorder-group/reorder-group.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ export class ReorderGroup implements ComponentInterface {
236236
const fromIndex = indexForItem(selectedItemEl);
237237

238238
if (toIndex === fromIndex) {
239+
// TODO(FW-6590): Remove this once the deprecated event is removed
240+
// Since the ionReorderEnd event is emitted at the end of every reorder
241+
// gesture, even if the item did not move, the user can always call
242+
// complete() to reset the state of the reorder group.
239243
this.completeReorder();
240244
} else {
241245
// TODO(FW-6590): Remove this once the deprecated event is removed

core/src/components/reorder-group/test/basic/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
});
137137

138138
reorderGroup.addEventListener('ionReorderEnd', ({ detail }) => {
139-
if (detail.from !== undefined && detail.to !== undefined) {
139+
if (detail.from !== detail.to) {
140140
console.log('ionReorderEnd: Dragged from index', detail.from, 'to', detail.to);
141141
} else {
142142
console.log('ionReorderEnd: No position change occurred');

0 commit comments

Comments
 (0)