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

[BUG] Pager scrolls in the opposite direction in RLT languages #334

Open
larryonoff opened this issue Jan 31, 2024 · 0 comments
Open

[BUG] Pager scrolls in the opposite direction in RLT languages #334

larryonoff opened this issue Jan 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@larryonoff
Copy link

Describe the bug
Pager scrolls in the opposite direction in RLT languages. User tries to scroll from top-to-bottom, but pager scrolls from bottom-to-top.

To Reproduce

    GeometryReader { geometry in
      let itemSize = CGSize(
        width: geometry.size.width,
        height: geometry.size.height - 63
      )

      if !itemSize.isEmpty {
        Pager(
          page: page,
          data: viewStore.state,
          id: \.self,
          content: { element in
            ...
          }
        )
        .alignment(.start)
        .itemSpacing(.itemSpacing)
        .preferredItemSize(itemSize, alignment: .start)
        .sensitivity(.high)
        .vertical()
        .templatePreviewSize(itemSize)
     }
  }

Expected behavior
Pager scrolls in the same direction user scrolls.

Environment:

  • iOS: 15, 16, 17
  • Device: Any iPhone
  • SwiftUIPager version: 2.5.0
@larryonoff larryonoff added the bug Something isn't working label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant