Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

initialScrollToIndex behaving in a weird way  #37

@andychikhany

Description

@andychikhany

I'm having a problem with initialScrollToIndex method, so when my component renders the list should immediately scroll to a certain given index, i was passing that through redux. the behavior i'm getting is that when the component mounts the initialScrollToIndex sometimes works sometimes it doesn't. first i thought its from redux so i simply gave it a static index of 10, though the unstable behavior remains. sometimes it moves sometimes no.

<SmoothPicker
offsetSelection={0}
initialScrollToIndex={initialIndex}
magnet
// scrollAnimation
horizontal
data={result}
activeOpacityButton={0}
keyExtractor={( index) => index.toString()}
onSelected={({ item, index }) => this.handleChange(item, index)}
renderItem={({item,index}) => this.renderScrollItem(item,index)}
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions