react-native-drag-sort
Advanced tools
Comparing version 1.3.6 to 2.0.0
@@ -26,3 +26,3 @@ import React, { Component } from 'react' | ||
isDragFreely?: boolean; | ||
onDragging?: (gestureState: any,left: number,top: number) => void; | ||
onDragging?: (gestureState: any, left: number, top: number, moveToIndex: number) => void; | ||
@@ -35,2 +35,10 @@ maxScale?: number; | ||
export default class DragSortableView extends Component<IProps>{} | ||
interface AutoIProps extends IProps { | ||
autoThrottle: number?, | ||
autoThrottleDuration: number?, | ||
} | ||
class DragSortableView extends Component<IProps>{} | ||
class AutoDragSortableView extends Component<AutoIProps> {} | ||
export { DragSortableView, AutoDragSortableView } |
import DragSortableView from './DragSortableView' | ||
import AutoDragSortableView from './AutoDragSortableView' | ||
export default DragSortableView | ||
export { DragSortableView, AutoDragSortableView } |
{ | ||
"name": "react-native-drag-sort", | ||
"version": "1.3.6", | ||
"version": "2.0.0", | ||
"description": "Drag and drop sort control for react-native", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,4 +13,19 @@ # react-native-drag-sort | ||
![](https://user-gold-cdn.xitu.io/2019/12/20/16f227b20501cd75?w=128&h=128&f=png&s=2098) | ||
### Update Progress | ||
#### 2020.1 Added auto swipe function | ||
##### If you do not need the auto-sliding function to use or are not satisfied with the Android effect, you can temporarily use DragSortableView (stable, reliable, long-term no-issus bug), if you want to use auto-sliding please use AutoDragSortableView。 | ||
##### The auto slide function is complete. iOS implements smooth auto-sliding. Android implements sliding an Item at a fixed time. After Android calls scrollTo, the refresh is relatively slow, causing jitter, so using a fixed time to slide 1 Item, this compromise method. You can also pass parameters: autoThrottle (sliding distance per unit time), autoThrottleDuration (time to slide a distance regularly)。 | ||
1. It is recommended to use Demo settings: Android automatically slides an item height every 400ms, and iOS automatically slides 2 every 10ms. | ||
2. If you want to achieve the same effect as Android and iOS, you can configure autoThrottle = {2}, autoThrottleDuration = {10} | ||
3. There will be time to optimize in the later period: trigger sliding condition optimization, Android jitter optimization when sliding. | ||
![](https://user-gold-cdn.xitu.io/2020/1/31/16ff953e160a4a8c?w=240&h=514&f=gif&s=3394945) | ||
![](https://user-gold-cdn.xitu.io/2020/1/31/16ff9538f47c623a?w=240&h=514&f=gif&s=4241359) | ||
#### 2019.10 | ||
@@ -79,2 +94,3 @@ > Add a new scene based on user needs. | ||
}} | ||
keyExtractor={(item,index)=> item.id} | ||
onClickItem={(data,item,index)=>{}} | ||
@@ -113,2 +129,4 @@ renderItem={(item,index)=>{ | ||
- **scaleDuration**: PropTypes.number; | ||
- **slideDuration**: PropTypes.number; | ||
- **slideDuration**: PropTypes.number; | ||
- **autoThrottle**: PropTypes.number; | ||
- **autoThrottleDuration**: PropTypes.number; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75976
10
972
129