gorhom / react-native-sticky-item

An interactive sticky item inspired by Facebook Stories.
MIT License
891 stars 48 forks source link

Move passed props to the end #5

Closed hirbod closed 4 years ago

hirbod commented 4 years ago

Hi @gorhom,

currently, you're applying the props at top https://github.com/gorhom/react-native-sticky-item/blob/master/src/StickyItemFlatList.tsx#L176

while all of these https://github.com/gorhom/react-native-sticky-item/blob/master/src/StickyItemFlatList.tsx#L177-L188

get appended hardcoded at the end and thus overwriting everything. While I do understand the reason behind this, since a lot of those props depend to your library, it might be worth to at least move some of them above. Specially decelerationRate={'fast'} might be something nice but imho its to slow and I would like to set it to normal.

Also the initialIndex might be something some would like to change. Could you at least consider these 2 to be set at top before ...rest so we could actually overwrite them?

gorhom commented 4 years ago

Hi @Hirbod , thanks for reporting this issue.

indeed initialIndex should not be override, i will also double check if i let decelerationRate to be controlled.

gorhom commented 4 years ago

this been fixed with Release v1.2.0

hirbod commented 4 years ago

What about decelerationRate?

gorhom commented 4 years ago

@Hirbod it will be shipped in the next release 👍