Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There could be a few reasons why the index values provided by CdkDragDrop in Angular Material Nested Tree are incorrect.

One possible reason is that the indexing system may not be considering the nested structure of the tree, leading to inconsistencies in the index values when dragging nodes within the tree. In this case, you can try updating the indexing system to account for the nested structure of the tree.

Another possible reason could be a bug or issue with the versions of Angular or Angular Material you are using. Try updating to the latest versions and see if the issue persists.

Lastly, it's also possible that you may not be setting up the CdkDragDrop events correctly or using the correct event properties to get the correct index values. Make sure to double-check your implementation and compare it with the Angular Material documentation and examples.