slorber / react-native-scroll-into-view

Scroll a ReactNative View into the visible screen. Similar to DOMElement.scrollIntoView() browser function.
https://thisweekinreact.com
MIT License
417 stars 13 forks source link

Having the same item scrolled into view after user scrolled manually. #3

Closed omerman closed 5 years ago

omerman commented 5 years ago

Hi, first of all thank you for the great lib!

I am having some issues with it, I have something like this:

<Root>
  <CustomScrollView> /* (align top) */
    <ScrollIntoView enabled={isAEnabled}>
      <A>
    </ScrollIntoView>
    ...
  </CustomScrollView>
  <Button onPress={setANotEnabled} />
  <Button onPress={setAEnabled} />
</Root>

After scrolling item A into view, aka, setting isAEnabled to true, and then user scrolls around manually, and say at some point isAEnabled is set to false, and then set to true again.. A is not scrolling into view.

Help?

slorber commented 5 years ago

Hi

Will check that next week.

If you can share a snack with the repro case that would be handy for me

slorber commented 5 years ago

closing, feel free to reopen with a repro