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

Accessing index of top visible widget in list #35

Open
1075dn opened this issue Jun 28, 2021 · 1 comment
Open

Accessing index of top visible widget in list #35

1075dn opened this issue Jun 28, 2021 · 1 comment

Comments

@1075dn
Copy link

1075dn commented Jun 28, 2021

Hi @Dimibe, and thank you so much for your excellent package - I came across it today and already started using it!

I tried accessing the index of the top visible widget in the list (as shown in the scrollable_positioned_list example).

However, I noticed that the resulting index did not match up with the correct item in the list of data I passed as elements.

Upon further investigation (DevTools), I understood that since the itemPositionsListener comes straight from scrollable_positioned_list (with no processing), the indices returned by itemPositions take the group separators into account as well. Is there a way to ignore them while calculating the correct index?

Or is there a different way I should be doing this?

Thanks again!

@teknofreek
Copy link

same issue here

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

2 participants