nativescript-community / nativescript-community/ui-pager

NativeScript Vue Pager issues with spacing, peaking and disable swipe

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
21
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hi I'm using the Pager in a NativeScript Vue application but I'm facing some problems with some of the component's properties. So far I've been testing on Android - using version 13.0.37.

  1. Setting spacing and/or peaking does not render items properly on load

    <Pager
      for="item in list"
      height="100%"
      spacing="5%"
      peaking="10%"
      :showIndicator="true"
      :canGoRight="false"
      indicatorColor="white"
      indicatorSelectedColor="gray"
      :selectedIndex="selectedIndex"
    >
      <v-template>
        <StackLayout height="90%" :class="$index % 2 === 0 ? 'bg-yellow-300' : 'bg-forest-green-400'" />
      </v-template>
    </Pager>
    

    The above code sets spacing to 5% and peaking to 10%. Here's a video to show case the result - here the selected item is at index 2:

    https://user-images.githubusercontent.com/36479149/177291841-a7deaaae-cb10-4651-a6bf-175e5380e88a.mov

    You will notice that there is no space between the pager items - once you start swiping the space is then taken into consideration.

  2. Setting canGoLeft / canGoRight to false doesn't seem to work

    The Pager in code and video show above has the canGoRight property set to false, however I am allowed to swipe to the right. Are there some other properties that should be set please?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Pager example in a NativeScript Vue application on Android using version 13.0.37, focusing on spacing, peaking, and canGoRight. Done means spacing and peaking render correctly on initial load and canGoLeft/canGoRight prevent swiping in the disabled direction.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.