Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onReordered toIndex jumps out of the data.length #52

Open
ilyago opened this issue Nov 7, 2024 · 0 comments
Open

onReordered toIndex jumps out of the data.length #52

ilyago opened this issue Nov 7, 2024 · 0 comments

Comments

@ilyago
Copy link

ilyago commented Nov 7, 2024

I'm using toIndex to read data inside onReordered and access its object value to recalculate LexoRank.
So if I drag any item at the bottom and go over the Flatlist box, the toIndex value becomes over the data.length

It gives me an error if I want to access the data array like removed[toindex].rank

I'm not sure if it's a bug, but for now, I have implemented workaround and made a comparison if it's in the range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant