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

min/max index and ImperativeApi animations don't seem to work #12

Open
iDVB opened this issue Oct 27, 2022 · 0 comments
Open

min/max index and ImperativeApi animations don't seem to work #12

iDVB opened this issue Oct 27, 2022 · 0 comments

Comments

@iDVB
Copy link

iDVB commented Oct 27, 2022

Expected

  • pager would wrap around when reaching the minIndex and maxIndex eg. if min was 0 and you decrementPage then it would land on the maxIndex
  • passing true to decrementPage(true) doesn't seem to put the animation in. Only seems to work with gestures.
  • examples in the docs for the above two would be great

Actual

  • pager just keeps counting up/down indefinitely.
  • animations appear to be gone. Just a sharp switch between pages
  const myTVEventHandler = evt => {
    const pager = pagerRef.current
    console.log(evt.eventType, pager)
    if (evt.eventType === 'right') {
      pager.incrementPage(true)
    } else if (evt.eventType === 'left') {
      pager.decrementPage(true)
    }
  }
  useTVEventHandler(myTVEventHandler)

...

<InfinitePager
      key={`infinite-pager-${preset}`}
      ref={pagerRef}
      renderPage={renderPage}
      style={styles.flex}
      vertical={true}
      minIndex={0}
      maxIndex={10}
      gesturesDisabled={true}
      pageWrapperStyle={styles.flex}
      preset={preset}
      pageBuffer={4}
    />
@iDVB iDVB changed the title Number of things seem to be working differently min/max index and ImperativeApi animations don't seem to work Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant