1- /*! react-sortablejs v1.2.1 | (c) 2016 Cheton Wu <cheton@gmail.com> | MIT | https://github.com/cheton/react-sortable */
1+ /*! react-sortablejs v1.3.0 | (c) 2017 Cheton Wu <cheton@gmail.com> | MIT | https://github.com/cheton/react-sortable */
22( function webpackUniversalModuleDefinition ( root , factory ) {
33 if ( typeof exports === 'object' && typeof module === 'object' )
44 module . exports = factory ( require ( "react" ) , require ( "react-dom" ) , require ( "sortablejs" ) ) ;
@@ -114,11 +114,18 @@ return /******/ (function(modules) { // webpackBootstrap
114114
115115 var options = _extends ( { } , this . props . options ) ;
116116
117- [ 'onStart' , 'onEnd' , 'onAdd' , 'onSort ' , 'onUpdate ' , 'onRemove' , 'onFilter' , 'onMove' ] . forEach ( function ( name ) {
117+ [ 'onChoose' , ' onStart', 'onEnd' , 'onAdd' , 'onUpdate ' , 'onSort ' , 'onRemove' , 'onFilter' , 'onMove' , 'onClone '] . forEach ( function ( name ) {
118118 var eventHandler = options [ name ] ;
119119
120- options [ name ] = function ( evt ) {
121- if ( name === 'onStart' ) {
120+ options [ name ] = function ( ) {
121+ for ( var _len2 = arguments . length , params = Array ( _len2 ) , _key2 = 0 ; _key2 < _len2 ; _key2 ++ ) {
122+ params [ _key2 ] = arguments [ _key2 ] ;
123+ }
124+
125+ var evt = params [ 0 ] ;
126+
127+
128+ if ( name === 'onChoose' ) {
122129 store . nextSibling = evt . item . nextElementSibling ;
123130 store . activeComponent = _this2 ;
124131 } else if ( ( name === 'onAdd' || name === 'onUpdate' ) && _this2 . props . onChange ) {
@@ -143,7 +150,10 @@ return /******/ (function(modules) { // webpackBootstrap
143150 }
144151
145152 if ( evt . type === 'move' ) {
146- var canMove = eventHandler ? eventHandler ( evt ) : true ;
153+ var _evt = params [ 0 ] ,
154+ originalEvent = params [ 1 ] ;
155+
156+ var canMove = eventHandler ? eventHandler ( _evt , originalEvent ) : true ;
147157 return canMove ;
148158 }
149159
0 commit comments