Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49375

IonReorderGroup.completeReorder standalone gives error 'Cannot read properties of undefined (reading 'length')'

$
0
0

Hi, I have started converting my Ionic Angular project from Modules to standalone. I have the latest Ionic and Angular, and everything is working fine, including the IonReorderGroup.

I ran the Angular script to convert to standalone, and am working my way through components, importing from @ionic/angular/standalone

Most seems to be working so far (I have not finished yet), but I have just got up to a component that uses `IonReorderGroup`.

All Ionic imports are from @ionic/angular/standalone.

I have removed all my custom contents, and now just have a basic IonReorderGroup template like

 <ion-list>
      <ion-reorder-group [disabled]="false" (ionReorderEnd)="handleReorder($any($event))">

        <ion-item>
          <ion-label> Item 1 </ion-label>
          <ion-reorder slot="end"></ion-reorder>
        </ion-item>

        <ion-item>
          <ion-label> Item 2 </ion-label>
          <ion-reorder slot="end"></ion-reorder>
        </ion-item>

        <ion-item>
          <ion-label> Item 3</ion-label>
          <ion-reorder slot="end"></ion-reorder>
        </ion-item>

      </ion-reorder-group>
    </ion-list>

However, I now get the following error on the completeReorder handler….

this.el is the following…

and the member __children is undefined, hence the exception when trying to access .length

I saved my progress and went back to before I started the standalone, and put a break point in the same place. In this case, this.el looks a bit different, and .children is not undefined…

Does anyone have any ideas what could be causing this?

My project conversion is not finished yet, I don’t know if this could have anything to do with it, (it is a large project), but other parts are all working.

Thanks in advance for any help in diagnosing this.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49375

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>