felire / react-native-animated-dots-carousel

Package to configure your dots pagination carousel just like Instagram does
MIT License
53 stars 12 forks source link

maxIndicators Property Prevents Rendering in "react-native-animated-dots-carousel" #4

Open N0deNinja opened 1 year ago

N0deNinja commented 1 year ago

Hello,

I am currently utilizing the "react-native-animated-dots-carousel" in my React Native project and have stumbled upon an issue with the maxIndicators property.

Description of the Issue:

When the number of items in the data array exceeds the value set in the maxIndicators property, the dots fail to render. Conversely, when the maxIndicators property is set to a value greater than the number of items, it functions correctly. Steps to Reproduce:

  1. Set the maxIndicators property to 3.
  2. Include 4 items in the data array.
  3. Observe that the dots does not render.

Expected Behavior:

I anticipated that setting a maxIndicators value less than the number of items would still allow the dots to function properly, with the additional items being accommodated.

Actual Behavior:

The dots fails to render when the maxIndicators value is less than the number of items in the data array. Additional Information:

I find this behavior strange because, based on the examples provided in your GitHub repository, it seems like this functionality should work correctly. It appears that in your examples, the dots renders fine even when the maxIndicators is less than the number of items. Environment:

  1. React Native version: 0.71.1
  2. OS : iOS

I would appreciate any guidance or updates that can address this issue. Thank you for your time and assistance.

N0deNinja commented 1 year ago

Do you guys have any idea what could be the cause of this ?

felire commented 1 year ago

Are you using the length prop?

N0deNinja commented 1 year ago

Yes I am.