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

react-native SectionList can not scrollToLocation when i was scrolling #26206

Closed
bigkrys opened this issue Aug 27, 2019 · 2 comments
Closed

react-native SectionList can not scrollToLocation when i was scrolling #26206

bigkrys opened this issue Aug 27, 2019 · 2 comments
Labels
Bug Component: SectionList Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@bigkrys
Copy link

bigkrys commented Aug 27, 2019

I want to implement a component similar to address book, but SectionList can jump normally when clicking on the letter on the right when there is no scroll. But when it's scrolling (and the inertia isn't over), clicking on the right letter doesn't jump
React Native version:

System:
OS: Windows 10
CPU: (20) x64 Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz
Memory: 8.47 GB / 15.93 GB
Binaries:
Yarn: 1.16.0 - C:\Users\windows10\AppData\Roaming\npm\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
react-native :0.58.6 react:16.8.3

Steps To Reproduce

<SectionList ref="sectionList" renderSectionHeader={this.renderSectionHeader} getItemLayout={this.itemLayout} sections={this.props.dataList} renderItem={this.renderItem} keyExtractor={(item, index)=> String(index)} onScrollBeginDrag={(event)=>{ this.refs.letterspace.changeActive() }} refreshing={this.props.isRefreshing} />
Clicking on the right letter triggers the following function
getIndex = (index) => { let rollIndex = index // console.log(rollIndex,'rollindex') this.refs.sectionList.scrollToLocation({animated: false, itemIndex: 0, sectionIndex: rollIndex}) }

Describe what you expected to happen:

Snack, code example, screenshot, or link to a repository:

@stale
Copy link

stale bot commented Nov 25, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 25, 2019
@stale
Copy link

stale bot commented Dec 2, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Dec 2, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: SectionList Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants