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

SectionList's onScrollToIndexFailed does not catch requested sectionIndex & itemIndex #47909

Open
arasrezaei opened this issue Nov 22, 2024 · 2 comments

Comments

@arasrezaei
Copy link

arasrezaei commented Nov 22, 2024

Description

onScrollToIndexFailed returns index,heighestMeasuredIndex, and averageItemHeight, which is enough in FlatList.
but in sectionList it should return requested sectionIndex and itemIndex, and heighestMeasured section & item index in addition to flat index, because we have only scrollToLocation method available for sectionList and section and item index params are needed.

Steps to reproduce

run the snack, press on scroll to no where, you will see the alert

React Native Version

0.76.3

Affected Platforms

Runtime - Android, Runtime - iOS, Runtime - Web, Runtime - Desktop, Build - MacOS, Build - Windows, Build - Linux

Output of npx react-native info

System:
  OS: Windows 11 10.0.22000
  CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Memory: 8.47 GB / 15.89 GB
Binaries:
  Node:
    version: 23.0.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.0
    path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
  npm:
    version: 10.9.0
    path: C:\Program Files\nodejs\npm.CMD
  Watchman:
    version: 20241027.093345.0
    path: E:\Software\Watchman\bin\watchman.EXE
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Disabled
IDEs:
  Android Studio: Not Found
  Visual Studio: Not Found
Languages:
  Java:
    version: 21.0.3
    path: /c/Program Files/Eclipse Adoptium/jdk-21.0.3.9-hotspot/bin/javac
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.2
    wanted: 0.76.2
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

scroll to index failed

Reproducer

https://snack.expo.dev/@arasrezaie/sectionlist-example

Screenshots and Videos

No response

@react-native-bot
Copy link
Collaborator

Warning

Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.

@react-native-bot
Copy link
Collaborator

Warning

Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.

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

No branches or pull requests

2 participants