UNPKG

11.7 kBMarkdownView Raw
1## v3.7.0
2### New features and enhancements
3* Add a new callback method: [`onBeforeSnapToItem()`](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/PROPS_METHODS_AND_GETTERS.md#methods)
4* Add prop `lockScrollTimeoutDuration`
5* Add the ability to enable/disable callback's execution when snaping programmatically
6* Add the ability to change `scrollEnabled` to `true` from initially `false` (thanks [@tomauty](https://github.com/tomauty))
7### Bugfixes
8* Fix random errors when accessing wrapped component's reference
9* Fix errors triggered when calling `setState()` while the component has already been unmounted
10### Other
11* Support `keyExtractor` on `ScrollView` (thanks [@hadimhd](https://github.com/hadimhd))
12
13## v3.6.0
14* Add a `layout` prop to let users choose between 3 different carousel layouts (see [the documentation](https://github.com/archriss/react-native-snap-carousel#layouts-and-custom-interpolations))
15![react-native-snap-carousel default layout](https://i.imgur.com/e1WbZcu.gif)
16![react-native-snap-carousel stack layout](https://i.imgur.com/foMIGM2.gif)
17![react-native-snap-carousel tinder layout](https://i.imgur.com/R7OpEFs.gif)
18* Add the ability to define dynamic styles based on scroll position with props `scrollInterpolator` and `slideInterpolatedStyle`. This allows implementing custom animations and layouts (see [the dedicated documentation](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/CUSTOM_INTERPOLATIONS.md)).
19* Rename props `customAnimationType` and `customAnimationOptions` to `activeAnimationType` and `activeAnimationOptions`
20
21## v3.5.0
22* Add the ability to render either a `ScrollView` component or a `FlatList` one (default) ([see prop `useScrollView`](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/PROPS_METHODS_AND_GETTERS.md#behavior))
23* Add support for versions of React Native < `0.43` (see [this note](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/KNOWN_ISSUES.md#react-native-version))
24* Add support for custom animations ([see props `customAnimationType` and `customAnimationOptions`](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/PROPS_METHODS_AND_GETTERS.md#style-and-animation))
25* Add method [`triggerRenderingHack()`](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/PROPS_METHODS_AND_GETTERS.md#available-methods) to work around [a random `FlatList` bug](https://github.com/facebook/react-native/issues/1831) that keeps content hidden until the carousel is scrolled
26* Hack around `ScrollView`/`FlatList` image rendering issues on Android
27* Fix issue with tappable dots when loop is enabled
28
29## v3.4.0
30* Fix `snapToItem` call that results in snapping to the wrong item when `loop` is enabled
31* Fix issue that, in some use cases, prevents every items but the initial ones to be rendered
32* On Android, prevent loop and callback issues because scroll offset's value doesn't return an integer
33* Add prop `inactiveSlideShift` (see #204)
34* Expose `FlatList`'s prop `inverted` (**use at your own risk since it will mess with the current handling of RTL layouts**)
35* Set `removeClippedSubviews` to `true` by default
36
37## v3.3.4
38* Fix issue with possible faulty index when `loopClonesPerSide` is greater than data length
39* Guard against `setNativeProps()` being `undefined`
40* On Android, make sure that the first item has the proper active style after init
41* On iOS, remove the feature "snap as soon as the previous/next item becomes active when `lockScrollWhileSnapping` is enabled" since it messes with direct calls to `snapToItem()`
42
43## v3.3.3
44* Prevent issue on iOS when `enableSnap` is set to `false` while `lockScrollWhileSnapping` is set to `true`
45
46## v3.3.2
47* Fix issue with `lockScrollWhileSnapping` when no callback was provided
48* `Pagination` component: add props `activeOpacity` and `dotContainerStyle`
49
50## v3.3.1
51* Fix issue when initializing the carousel with empty data
52* Make tappable `PaginationDot` snaps to the right item when loop is enabled
53
54## v3.3.0
55* Bring in the most wanted 'infinite loop' feature :tada: (see [the 'Loop' section](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/PROPS_METHODS_AND_GETTERS.md#loop) for more info about the new props `loop` and `loopClonesPerSide`)
56* Improve Android behavior when momentum is disabled
57* Guard against potential errors when component is unmounted
58* Add prop `lockScrollWhileSnapping` to improve behavior when momentum is disabled
59
60## v3.2.3
61* Fix issue with callback not fired when doing a long swipe
62
63## v3.2.2
64* Fix RTL issues
65* Fix issue with active item when `enableMomentum` was set to `true`
66* Fix issue with overlapping items (thanks [@henninghall](https://github.com/henninghall))
67* `ParallaxImage` component: allow overriding default styles
68* `Pagination` component: adapt to RTL layouts
69
70## v3.2.1
71* Fix issue with active item when no callback has been specified (introduced in version `3.2.0`)
72
73## v3.2.0
74* Refactor callback handling. **Make sure to use the new prop `callbackOffsetMargin` if you experience missed callbacks.**
75* Make item's scale and opacity animations follow scroll value (thanks [@hammadj](https://github.com/hammadj))
76* `Pagination` component: make dots tappable with new props `tappableDots` and `carouselRef` (see the [example](https://github.com/archriss/react-native-snap-carousel/blob/master/example/src/index.js))
77* Fix issue when carousel has been unmounted but parent container requires to re-render
78* Fix state and scroll issues when the currently active item is being dynamically removed
79* Improve snap feeling when momentum is disabled (default)
80* Add prop `callbackOffsetMargin`
81* Remove props `animationFunc`, `animationOptions`, `scrollEndDragDebounceValue`, `snapOnAndroid`, and `useNativeOnScroll`
82
83## v3.1.0
84* `Pagination` component: add new props for advanced customization
85
86## v3.0.0
87### WARNING
88* **Do not use this version as some temporary code was pushed to `npm` by mistake. Make sure to use version `3.1.0` instead.**
89### Breaking changes
90* Plugin is now built on top of `FlatList`, which allows for huge performance optimizations. From now on, items must be rendered using props `data` and `renderItem`.
91### General
92* Add `ParallaxImage` component (see the specific documentation [here](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/PARALLAX_IMAGE.md))
93* Add prop `activeSlideAlignment`
94* Fix issue with autoplay when setting `scrollEnabled` to `false`
95* Prevent going back to the first item when overscrolling the last one
96* Prevent callback from being called at the wrong time in some specific scenarios
97
98## v2.4.0
99* Add `Pagination` component (see the specific documentation [here](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/PAGINATION.md))
100* Allow `firstItem` to be changed dynamically
101* Allow `0` value for `carouselHorizontalPadding` and `carouselVerticalPadding` (thanks [@bonbonez](https://github.com/bonbonez))
102* Keep the easing of slide's opacity animation linear
103* Use native driver for slide's animation (can be overridden via `animationOptions`)
104
105## v2.3.1
106* Fix issue when snap is disabled
107
108## v2.3.0
109* Refactor callback handling to provide a more reliable solution when momentum is disabled
110* Fix issue with parallel animations (thanks [@jnbt](https://github.com/jnbt))
111* Prevent calls to `undefined` interpolators when working with dynamic slides (thanks [@cskaynar](https://github.com/cskaynar))
112* Improve vertical mode
113* Add prop `scrollEndDragDebounceValue`
114* Expose current scroll position with `this.currentScrollPosition`
115* Remove props `scrollEndDragThrottleValue` and `snapCallbackDebounceValue` (use `scrollEndDragDebounceValue` instead)
116
117## v2.2.2
118* Fix issue that prevented inactive styles of first and last items to be applied when using `snapToPrev` and `snapToNext` methods
119
120## v2.2.1
121* Do not mark `sliderWidth` and `sliderHeight` as required
122* Add warnings when properties specific to carousel's orientation haven't been set
123
124## v2.2.0
125* Implement vertical mode (prop `vertical`)
126* Make sure that current active item is properly updated when snapping
127* Prevent issues when 'sliderWidth' is smaller than viewport's width
128* Recalculate card positions on layout to handle rotation (thanks [@andrewpope](https://github.com/andrewpope)); make sure to read [this note](https://github.com/archriss/react-native-snap-carousel/blob/master/doc/TIPS_AND_TRICKS.md#handling-device-rotation)
129* Refresh card positions if slider and/or item's dimensions are updated (thanks [@hoangnm](https://github.com/hoangnm))
130* Add props `scrollEndDragThrottleValue` and `snapCallbackDebounceValue`
131* Expose `View`'s `onLayout` prop
132* Deprecate prop `onScrollViewScroll`
133
134## v2.1.4
135* Add prop `onScrollViewScroll`
136
137## v2.1.3
138* Default value for `showsHorizontalScrollIndicator` is now `false`
139* Expose `ScrollView`'s `onSscroll` prop (thanks [@radko93](https://github.com/radko93))
140
141## v2.1.2
142* Do not trigger `onSnapToItem` when snapping back to the same slide (thanks [@rgabs](https://github.com/rgabs))
143* Add prop `carouselHorizontalPadding` to override container's inner padding (thanks [@skeie](https://github.com/skeie))
144
145## v2.1.1
146* Ensure compatibility with RN 0.43 (previous version of plugin's dependency `react-addons-shallow-compare` was breaking with React 16)
147* Fix issue with padding on iOS that could cause the carousel to snap back when its last item was clicked
148
149## v2.1.0
150* Add RTL support
151* Keep current active item when adding slides dynamically
152* Prevent invalid `firstItem` number
153* Add prop `activeSlideOffset`
154
155## v2.0.3
156
157* Prevent error when carousel has only one child (thanks [@kevinvandijk](https://github.com/kevinvandijk))
158* Fix issue when appending dynamic slides (the first one was ignored)
159* Fix edge case that prevented the first slide from being focused when swiping back with momentum enabled
160* Bump example's RN version to 0.42.3
161
162## v2.0.2
163
164* Make sure that scroll indicator is hidden by default
165
166## v2.0.1
167
168* Fix un-handled exception with interpolators (thanks [@chitezh](https://github.com/chitezh))
169
170## v2.0.0
171
172* Items are now direct children of the `<Carousel />` component, which makes it easier to use (thanks [@Jonarod](https://github.com/Jonarod))
173* Props `items` and `renderItem` have been removed
174
175## v1.6.1
176
177* Due to some touch events being buggy, rework methods so the children will receive touch events on Android
178
179## v1.6.0
180
181* Add prop `enableMomentum`
182* Fix an infinite-loop on iOS with momentum enabled
183* Fix the snapping effect when releasing touch without interia on iOS with momentum enabled
184* Fix autoplay on Android, it should start and stop properly and stop being triggered while swiping
185* Use `View.propTypes.style` instead of `PropTypes.number` in styles validation (thanks [@pesakitan22](https://github.com/pesakitan22))
186
187## v1.5.0
188
189* Items length can now be changed on-the-fly (thanks [@superical](https://github.com/superical))
190* Now handling momentum (thanks [@FakeYou](https://github.com/FakeYou))
191
192## v1.4.0
193
194* Better update strategy with shallowCompare
195* Add `snapToNext()`, `snapToPrev()`, `currentIndex` methods and properties
196
197## v1.3.1
198
199* Properly center on first item when mounting component on Android (potentially iOS too)
200
201## v1.3.0
202
203* Pass the item data as the 2nd param of `onSnapToItem` callback
204
205## v1.2.1
206
207* Fix reference call when the component has been unmounted
208
209## v1.2.0
210
211* Add prop `onSnapToItem`
212
213## v1.1.0
214
215* Center slides properly
216* Handle one slide only
217* Add props `inactiveSlideScale`, `inactiveSlideOpacity`, `containerCustomStyle` and `contentContainerCustomStyle`
\No newline at end of file