@@ -15,7 +15,9 @@ var Slider = React.createClass({
15
15
error : React . PropTypes . string ,
16
16
description : React . PropTypes . string ,
17
17
name : React . PropTypes . string . isRequired ,
18
- onChange : React . PropTypes . func
18
+ onChange : React . PropTypes . func ,
19
+ onDragStart : React . PropTypes . func ,
20
+ onDragStop : React . PropTypes . func
19
21
} ,
20
22
21
23
mixins : [ Classable ] ,
@@ -62,7 +64,7 @@ var Slider = React.createClass({
62
64
if ( percent > 1 ) percent = 1 ; else if ( percent < 0 ) percent = 0 ;
63
65
64
66
return (
65
- < div className = { classes } >
67
+ < div className = { classes } style = { this . props . style } >
66
68
< span className = "mui-input-highlight" > </ span >
67
69
< span className = "mui-input-bar" > </ span >
68
70
< span className = "mui-input-description" > { this . props . description } </ span >
@@ -140,12 +142,14 @@ var Slider = React.createClass({
140
142
this . setState ( {
141
143
dragging : true
142
144
} ) ;
145
+ if ( this . props . onDragStart ) this . props . onDragStart ( e , ui ) ;
143
146
} ,
144
147
145
148
_onDragStop : function ( e , ui ) {
146
149
this . setState ( {
147
150
dragging : false
148
151
} ) ;
152
+ if ( this . props . onDragStop ) this . props . onDragStop ( e , ui ) ;
149
153
} ,
150
154
151
155
_onDragUpdate : function ( e , ui ) {
0 commit comments