Summary:
I had fixed this locally but hadn't updated the original pull request, sorry. This commit is working for us in production.
Closes https://github.com/facebook/react-native/pull/14900
Differential Revision: D5539787
Pulled By: hramos
fbshipit-source-id: 6c826ada4a7f36607c65508ced6c9dce32002f74
Summary:
The primary use case for this is disabling swipe right when using react-navigation's swipe to go back feature.
Closes https://github.com/facebook/react-native/pull/14684
Differential Revision: D5386554
Pulled By: sahrens
fbshipit-source-id: 1e7c4caaa804f86977d391c1bdb62be69342b551
Summary:
This replaces all uses of `React.createClass` with `createReactClass` from the `create-react-class` package, attempting to match use of `var` and `const` according to local style.
Fixes#14620
Refs #14712
Closes https://github.com/facebook/react-native/pull/14729
Differential Revision: D5321810
Pulled By: hramos
fbshipit-source-id: ae7b40640b2773fd89c3fb727ec87f688bebf585
Summary:
I noticed I didn't get type defs anymore for react-native. Looks like it is broken since we removed the .flow file in 3e153b2a5b. To fix it we can now enable flow in react-native-implementation since it now supports properties.
**Test plan**
Tested that I get type hints when using imports from react-native in a project.
Closes https://github.com/facebook/react-native/pull/12917
Differential Revision: D4704753
Pulled By: ericvicenti
fbshipit-source-id: cf882588d7f371931de8d7861a1a6d50f6c425dc
Summary: Update the props to allow not passing in an onScroll callback
Reviewed By: zjj010104
Differential Revision: D4604474
fbshipit-source-id: 9371776d1451f7bd0247fbafaf4bf7198291d1b1
Summary:
React Native 0.39 introduced a breaking change through a new C-based implementation of css-layout. Developers were encouraged to remove unnecessary flex: 1 styles where no longer required to address any resulting layout issues.
The SwipeableListView has not yet been updated to reflect this change. Specifically, SwipeableRow still sets flex: 1 even though it shouldn't.
This was resulting in a rendering issue for folks when they upgraded to React Native 0.39 and used SwipeableListView that caused significant initial flickering when rendering a SwipeableListView. The solution was simply to remove flex: 1 from the SwipeableRow implementation.
This small change removes flex: 1 to resolve this issue.
Suggested reviewer (initial SwipeableListView contributor): fred2028
See this issue for more details: https://github.com/facebook/react-native/issues/11441
Closes https://github.com/facebook/react-native/pull/11521
Differential Revision: D4532562
Pulled By: lacker
fbshipit-source-id: 5c2907186d00481a731bd81794947a019465a031
Summary:
The back view in <SwipeableRow /> should not be rendered unless the front view has been
rendered and its layout has been measured.
Reviewed By: fred2028
Differential Revision: D4509584
fbshipit-source-id: 72ad0c8e7dec258ae3a1ba88c0adeb9ad0bfdf6d
Summary:
**motivation**
Right now `SwipeableQuickActions` only allows two actions. Let this limit be in the userland.
cc fred2028
Closes https://github.com/facebook/react-native/pull/8528
Differential Revision: D4211729
Pulled By: ericvicenti
fbshipit-source-id: 903592190b9855ffe9da44864cdc276bc1e18a7c
Summary:
If a SwipeableRow does not have background color defined, QuickAction is rendered below the row. In such case, you can leverage openRowID defined in dataSource. For instance, one can render quickAction only for the open row. The openRowID, however, does not clear when the row is closed. It only clears when the ListView is scrolled. This is s small PR to fix address it.
Closes https://github.com/facebook/react-native/pull/11380
Differential Revision: D4500952
Pulled By: mkonicek
fbshipit-source-id: a965dfb45b77cc1669de405b627d13e2cee59420
Summary:
Without allowing Native Responder on Android, ListView get's Deadlocked while trying to scroll. This happens as soon as a PanResponder fires.
This Commit prevents this Issue and the iOS Optimization for Locking / Unlocking Listview Scrolls does a good job on Android too. So there's no need to prevent the Native Responder.
**Test plan (required)**
Compile on Android in Production Mode and try to scroll before and after this change.
Closes https://github.com/facebook/react-native/pull/8556
Differential Revision: D4438057
Pulled By: hramos
fbshipit-source-id: 05f3b7e6b4e49f5c941c7e1ce72c8bf6d66a9a28
Summary:
Currently, swipeableList expects maxSwipeoutDistance to be a number. This breaks when you want each row to have a variable width slideoutView.
This PR add support for passing maxSwipeoutDistance as a number(as before) or a function which gets the current rowData for conditionally returning the distance based on the row data.
Closes https://github.com/facebook/react-native/pull/10189
Differential Revision: D4168561
Pulled By: hramos
fbshipit-source-id: b78564f83279cab3bf04297034ca78edfff74be7
Summary: If a user scrolls the `SwipeableListView`, any open row(s) will close.
Reviewed By: furdei
Differential Revision: D3903787
fbshipit-source-id: efd9ae896ba50ad6e83e72d52bc1f5c0c35efd61
Summary: Modified logic and constants to make the swipable row animations feel more natural and smooth.
Reviewed By: fred2028
Differential Revision: D3801391
fbshipit-source-id: d4301fe01a190803b5bc27373a9755086b6c431d
Summary: create new RCTI18nManager.js to warp-up native module I18nManager and fix current use of it.
Reviewed By: ericvicenti
Differential Revision: D3547427
fbshipit-source-id: 53a695c94ca6bba2f566d0725c553e58d60bf451
Summary:
**motivation**
Currently when using a non-touchable visible row for a SwipeableRow, the scroll on list view is blocked.
**Test Plan**
```
<SwipeableListView
dataSource={dataSource}
renderRow={() => <View style={styles.row}/>}
renderQuickActions={() => <View style={styles.hiddenrow}/>}
/>
```
* Tested that when using non-touchable for renderRow allows scrolling on list view.
* Tested that when using touchable for renderRow allows scrolling on list view.
cc fred2028
Closes https://github.com/facebook/react-native/pull/8537
Differential Revision: D3542407
Pulled By: fred2028
fbshipit-source-id: b7ad7ff7c7dd1b717544746a85bb265414aa18f4
Summary:
Flipped the gesture for SwipeableRow
Provide RTL support for SwipeableRow. When developer set RTL layout in their app, all the animation and gesture will change to RTL status.
Reviewed By: fkgozali
Differential Revision: D3532919
fbshipit-source-id: 76fc94cdaa8457350e9bbe3366aa714c9eb45245
Summary:
This is simple fix to SwipeableListView. According to SwipeableListViewDataSource, the only method available is cloneWithRowsAndSections. If you try to get the data from a SwipeableListView, without this fix it won't work. This change fixes the problem so that SwipeableListView can work correctly.
Closes https://github.com/facebook/react-native/pull/8493
Differential Revision: D3523384
fbshipit-source-id: 359ff274fabcab676ed6dee24f0652c4146cde69
Summary: I noticed sometimes the swipeable row prioritizes the list view's vertical scroll too much, or returns to closed position if swiped a little distance but at high velocity. These new thresholds help both cases.
Reviewed By: hedgerwang
Differential Revision: D3441994
fbshipit-source-id: 84a9fdf63a33b3047a9a0205e87d8c489e9a6631
Summary: Slower bounce during mount and right swipe, so it feels less jarring to users.
Reviewed By: hedgerwang
Differential Revision: D3420169
fbshipit-source-id: d5da87c4a64eecf478edd626c96f5541ab94b56e
Summary: So users can know how to use
Reviewed By: hedgerwang
Differential Revision: D3399028
fbshipit-source-id: 5ce97c5464f1975145aba1bcf4b79550394859ae
Summary: Allow some right swipe so users know swiping is a possibility, with some bounceback.
Reviewed By: fkgozali
Differential Revision: D3388836
fbshipit-source-id: 596a6be3c641ff0ee6ac32d7c0d798478edef72b