-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
After upgrading from 8.6.x to 8.7.x, IonReorder no longer works. Whenever I try to reorder an item, I get a console error: TypeError: undefined is not an object (evaluating 'children.length')
In my own custom code, I noticed that to
and from
are returning -1 and undefined. This is happening both with the deprecated onIonItemReorder
and the new onIonReorderEnd
.
Expected Behavior
I expect to be able to reorder items like I could in 8.6.x.
Steps to Reproduce
- Launch the demo app and try to reorder an item. I am using the code from the docs.
Code Reproduction URL
https://github.com/ptmkenny/ionic-reorder-app
Ionic Info
Ionic:
Ionic CLI : 7.2.1 (/opt/homebrew/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 8.7.1
Capacitor:
Capacitor CLI : 7.4.2
@capacitor/android : not installed
@capacitor/core : 7.4.2
@capacitor/ios : not installed
Utility:
cordova-res : 0.15.4
native-run : 2.0.1
System:
NodeJS : v24.4.1 (/opt/homebrew/Cellar/node/24.4.1/bin/node)
npm : 11.4.2
OS : macOS Unknown
Additional Information
Reverting to 8.6.0 will restore reorder functionality.
It's not exactly related, but the deprecation message "message": "
onIonItemReorderis deprecated. Use
ionReorderEndinstead. If you are accessing
event.detail.fromor
event.detail.toand relying on them being different you should now add checks as they are always emitted in
ionReorderEnd, even when they are the same.",
is wrong because the prop is onIonReorderEnd
not ionReorderEnd
.