File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -151,14 +151,32 @@ const Swipeable = React.createClass({
151151 } ,
152152
153153 render : function ( ) {
154+ const newProps = {
155+ ...this . props ,
156+ onTouchStart : this . touchStart ,
157+ onTouchMove : this . touchMove ,
158+ onTouchEnd : this . touchEnd ,
159+ }
160+
161+ delete newProps . onSwiped
162+ delete newProps . onSwiping
163+ delete newProps . onSwipingUp
164+ delete newProps . onSwipingRight
165+ delete newProps . onSwipingDown
166+ delete newProps . onSwipingLeft
167+ delete newProps . onSwipedUp
168+ delete newProps . onSwipedRight
169+ delete newProps . onSwipedDown
170+ delete newProps . onSwipedLeft
171+ delete newProps . flickThreshold
172+ delete newProps . delta
173+ delete newProps . preventDefaultTouchmoveEvent
174+ delete newProps . nodeName
175+ delete newProps . children
176+
154177 return React . createElement (
155178 this . props . nodeName ,
156- {
157- ...this . props ,
158- onTouchStart : this . touchStart ,
159- onTouchMove : this . touchMove ,
160- onTouchEnd : this . touchEnd ,
161- } ,
179+ newProps ,
162180 this . props . children
163181 ) ;
164182 }
You can’t perform that action at this time.
0 commit comments