duyluonglc / react-native-thumbnail-grid

75 stars 37 forks source link

Prop to pass amount of photos that are not showing #6

Closed lucasbento closed 6 years ago

lucasbento commented 6 years ago

Hey @duyluonglc, awesome job on this library, I was wondering if there's a way to pass the amount of images that can be shown through a prop instead of passing all the URLs and, if there isn't, is this feature valuable to the library?

My use-case is that I will retrieve 6 images of 20 images from my API and I need to show +14 on the count.

lucasbento commented 6 years ago

Already did a small change for it here: https://github.com/lucasbento/react-native-photo-grid/commit/829f31b969448bfea82b4822f44637c80aa3492e.

duyluonglc commented 6 years ago

Hi @lucasbento welcome your PR :) Should set PhotoGrid.defaultProps = { numberImagesToShow: 5 } then replace constant 5 by numberImagesToShow

lucasbento commented 6 years ago

@duyluonglc: what do you mean? let's continue the review on #7.