zbtang / React-Native-ViewPager

ViewPager and Indicator component for react-native on both android and ios.
950 stars 276 forks source link

Fix PagerDotIndicator Container Taking Up Entire Width of View on iOS #165

Open kas opened 5 years ago

kas commented 5 years ago

This fixes an issue on iOS where the container holding the dots takes up the entire width to the left and right of the dots. Before this fix, the container would block any elements that are rendered to the left and right of the dots. After this fix, the container shrinks down to only occupy the space that the dots occupy.

Here's some images showing the issue using the React Native Inspector:

Before

image

After

image

kas commented 5 years ago

Realized we need to keep position: 'absolute' or it interrupts how far down other elements can render.