@@ -644,19 +644,27 @@ export default class AutoDragSortableView extends Component{
644644 opacity : item . scaleValue . interpolate ( { inputRange, outputRange} ) ,
645645 transform : [ transformObj ]
646646 } ] } >
647- < TouchableOpacity
648- activeOpacity = { 1 }
649- delayLongPress = { this . props . delayLongPress }
650- onPressOut = { ( ) => this . onPressOut ( ) }
651- onLongPress = { ( ) => this . startTouch ( index ) }
652- onPress = { ( ) => {
653- if ( this . props . onClickItem ) {
654- this . isHasMeasure = true
655- this . props . onClickItem ( this . getOriginalData ( ) , item . data , index )
656- }
657- } } >
658- { this . props . renderItem ( item . data , index ) }
659- </ TouchableOpacity >
647+ { this . props . dontWrapItems ?
648+ this . props . renderItem ( item . data , index , {
649+ delayLongPress : this . props . delayLongPress ,
650+ onPressOut : ( ) => this . onPressOut ( ) ,
651+ onLongPress : ( ) => this . startTouch ( index ) ,
652+ } ) :
653+ < TouchableOpacity
654+ activeOpacity = { 1 }
655+ delayLongPress = { this . props . delayLongPress }
656+ onPressOut = { ( ) => this . onPressOut ( ) }
657+ onLongPress = { ( ) => this . startTouch ( index ) }
658+ onPress = { ( ) => {
659+ if ( this . props . onClickItem ) {
660+ this . isHasMeasure = true
661+ this . props . onClickItem ( this . getOriginalData ( ) , item . data , index )
662+ }
663+ } } >
664+ { this . props . renderItem ( item . data , index ) }
665+ </ TouchableOpacity >
666+ }
667+
660668 </ Animated . View >
661669 )
662670 } )
@@ -682,6 +690,8 @@ AutoDragSortableView.propTypes = {
682690
683691 sortable : PropTypes . bool ,
684692
693+ dontWrapItems : PropTypes . bool ,
694+
685695 onClickItem : PropTypes . func ,
686696 onDragStart : PropTypes . func ,
687697 onDragEnd : PropTypes . func ,
0 commit comments