Skip to content

Scroll to a specific item positionΒ #6

@RatFou

Description

@RatFou

Hi, I'm trying to scroll to a specific item but I'm stucked.

In my last test I used a modified scroll function (without the callback):
this.refs.scrollingMenu.scrollToIndex(i);
but it seems that the widths state is empty (this.state.widths[itemNum]).

I understand that this state is pushed in the loop function and the width is calculated with onLayout. I just don't get how to reproduce this onLayout in another function.

Any lead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions