File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ v1.1.0 - Tue, 12 Apr 2016 13:03:08 GMT
2+ --------------------------------------
3+
4+ - [ 6c03d17] ( ../../commit/6c03d17 ) [ added] trigger onAfterOpen callback when available. (#154 )
5+
6+
17v1.0.0 - Sat, 09 Apr 2016 05:03:25 GMT
28--------------------------------------
39
Original file line number Diff line number Diff line change 11{
22 "name" : " react-modal" ,
3- "version" : " 1.0 .0" ,
3+ "version" : " 1.1 .0" ,
44 "homepage" : " https://github.com/rackt/react-modal" ,
55 "authors" : [
66 " Ryan Florence" ,
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ var Modal = React.createClass({
3232 overlay : React . PropTypes . object
3333 } ) ,
3434 appElement : React . PropTypes . instanceOf ( SafeHTMLElement ) ,
35+ onAfterOpen : React . PropTypes . func ,
3536 onRequestClose : React . PropTypes . func ,
3637 closeTimeoutMS : React . PropTypes . number ,
3738 ariaHideApp : React . PropTypes . bool ,
@@ -194,6 +195,10 @@ var ModalPortal = module.exports = React.createClass({
194195 focusManager . markForFocusLater ( ) ;
195196 this . setState ( { isOpen : true } , function ( ) {
196197 this . setState ( { afterOpen : true } ) ;
198+
199+ if ( this . props . isOpen && this . props . onAfterOpen ) {
200+ this . props . onAfterOpen ( ) ;
201+ }
197202 } . bind ( this ) ) ;
198203 } ,
199204
You can’t perform that action at this time.
0 commit comments