File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ export default class ActionButton extends Component {
51
51
clearTimeout ( this . timeout ) ;
52
52
}
53
53
54
+ componentWillReceiveProps ( nextProps ) {
55
+ this . setState ( {
56
+ active : nextProps . active
57
+ } ) ;
58
+ }
59
+
54
60
getActionButtonStyle ( ) {
55
61
return [ styles . actionBarItem , this . getButtonSize ( ) ] ;
56
62
}
@@ -95,6 +101,7 @@ export default class ActionButton extends Component {
95
101
} ) . start ( ) ;
96
102
97
103
setTimeout ( ( ) => {
104
+ this . props . onClose ( ) ;
98
105
this . setState ( { active : false } ) ;
99
106
} , 250 ) ;
100
107
}
@@ -266,6 +273,7 @@ ActionButton.propTypes = {
266
273
autoInactive : PropTypes . bool ,
267
274
onPress : PropTypes . func ,
268
275
onOverlayPress : PropTypes . func ,
276
+ onClose : PropTypes . func ,
269
277
backdrop : PropTypes . oneOfType ( [
270
278
PropTypes . bool ,
271
279
PropTypes . object ,
@@ -290,6 +298,7 @@ ActionButton.defaultProps = {
290
298
autoInactive : true ,
291
299
onPress : ( ) => { } ,
292
300
onOverlayPress : ( ) => { } ,
301
+ onClose : ( ) => { } ,
293
302
backdrop : false ,
294
303
degrees : 135 ,
295
304
size : 63 ,
You can’t perform that action at this time.
0 commit comments