@@ -358,10 +358,8 @@ function (_Component) {
358358 _this = _possibleConstructorReturn ( this , ( _getPrototypeOf2 = _getPrototypeOf ( Animation ) ) . call . apply ( _getPrototypeOf2 , [ this ] . concat ( args ) ) ) ;
359359
360360 _defineProperty ( _assertThisInitialized ( _this ) , "state" , {
361- // eslint-disable-next-line react/destructuring-assignment
362- isVisible : ! _this . props . reveal ,
363- // eslint-disable-next-line react/destructuring-assignment
364- revealed : ! _this . props . reveal ,
361+ isVisible : false ,
362+ revealed : false ,
365363 countIterations : 0
366364 } ) ;
367365
@@ -446,6 +444,10 @@ function (_Component) {
446444 key : "componentDidMount" ,
447445 value : function componentDidMount ( ) {
448446 var reveal = this . props . reveal ;
447+ this . setState ( {
448+ isVisible : ! reveal ,
449+ revealed : ! reveal
450+ } ) ;
449451
450452 if ( reveal ) {
451453 window . addEventListener ( 'scroll' , this . updatePredicate ) ;
@@ -1067,19 +1069,9 @@ var CardFooter = function CardFooter(props) {
10671069 var classes = classNames ( ( _classNames = {
10681070 'white-text' : color && ! text
10691071 } , _defineProperty ( _classNames , "border-" . concat ( border ) , border ) , _defineProperty ( _classNames , 'bg-transparent' , transparent ) , _defineProperty ( _classNames , 'text-muted' , muted ) , _defineProperty ( _classNames , "" . concat ( text , "-text" ) , text ) , _classNames ) , 'card-footer' , color , className ) ;
1070- var component = React__default . createElement ( Tag , _extends ( {
1071- "data-test" : "card-footer"
1072- } , attributes , {
1072+ return React__default . createElement ( Tag , _extends ( { } , attributes , {
10731073 className : classes
1074- } ) ) ;
1075-
1076- if ( small ) {
1077- component = React__default . createElement ( Tag , _extends ( { } , attributes , {
1078- className : classes
1079- } ) , React__default . createElement ( "small" , null , " " , children , " " ) ) ;
1080- }
1081-
1082- return component ;
1074+ } ) , small ? React__default . createElement ( "small" , null , " " , children , " " ) : children ) ;
10831075} ;
10841076
10851077CardFooter . propTypes = {
@@ -3563,7 +3555,12 @@ function (_Component) {
35633555 this . fetchData ( data , this . paginateRows ) ;
35643556 }
35653557
3566- order . length && this . handleSort ( order [ 0 ] , order [ 1 ] ) ;
3558+ if ( order . length > 0 ) {
3559+ this . handleSort ( order [ 0 ] , order [ 1 ] ) ;
3560+ } else {
3561+ this . handleSort ( ) ;
3562+ }
3563+
35673564 this . setUnsearchable ( columns ) ;
35683565
35693566 if ( paging ) {
@@ -3768,7 +3765,7 @@ DataTable.propTypes = {
37683765 fixed : PropTypes . bool ,
37693766 hover : PropTypes . bool ,
37703767 info : PropTypes . bool ,
3771- infoLabel : PropTypes . arrayOf ( PropTypes . string ) ,
3768+ infoLabel : PropTypes . oneOfType ( [ PropTypes . array , PropTypes . object , PropTypes . string ] ) ,
37723769 maxHeight : PropTypes . string ,
37733770 noBottomColumns : PropTypes . bool ,
37743771 noRecordsFoundLabel : PropTypes . string ,
@@ -5692,19 +5689,21 @@ function (_Component) {
56925689 }
56935690 } ) ;
56945691
5695- _defineProperty ( _assertThisInitialized ( _this ) , "handleOnExited" , function ( node ) {
5692+ _defineProperty ( _assertThisInitialized ( _this ) , "handleOnExited" , function ( ) {
56965693 _this . props . hiddenModal && _this . props . hiddenModal ( ) ;
56975694 } ) ;
56985695
56995696 _defineProperty ( _assertThisInitialized ( _this ) , "handleBackdropClick" , function ( e ) {
5700- console . log ( e ) ;
5701-
57025697 if ( ! _this . props . backdrop || e . target . closest ( '[role="dialog"]' ) && ! e . target . classList . contains ( 'modal' ) ) {
57035698 return ;
57045699 }
57055700
5706- if ( ! _this . modalContent . contains ( e . target ) ) {
5707- _this . props . toggle ( ) ;
5701+ if ( ! ( e . clientX > e . target . clientWidth || e . clientY > e . target . clientHeight ) ) {
5702+ if ( ! _this . modalContent . contains ( e . target ) ) {
5703+ if ( ! _this . props . disableBackdrop ) {
5704+ _this . props . toggle ( ) ;
5705+ }
5706+ }
57085707 }
57095708 } ) ;
57105709
@@ -5756,11 +5755,13 @@ function (_Component) {
57565755 'modal-frame' : frame ,
57575756 'modal-dialog-centered' : centered
57585757 } , _defineProperty ( _classNames , "modal-" . concat ( size ) , size ) , _defineProperty ( _classNames , "modal-" . concat ( position ) , position ) , _defineProperty ( _classNames , "modal-notify white-text modal-" . concat ( modalStyle ) , modalStyle ) , _classNames ) , 'modal-dialog' , className ) ;
5759- var wrapperClasses = classNames ( _defineProperty ( {
5758+ var positionSplited = position . split ( '-' ) ;
5759+ var wrapperClasses = classNames ( {
57605760 modal : ! inline ,
57615761 fade : fade ,
5762- top : fade && ! animation && ! position
5763- } , "" . concat ( animation ) , fade && animation ) , fade && position && position . split ( '-' ) [ 1 ] , wrapClassName ) ;
5762+ top : fade && ! animation && ! position ,
5763+ animation : fade && animation
5764+ } , fade && position && position && positionSplited . length > 1 ? positionSplited [ 1 ] : positionSplited [ 0 ] , wrapClassName ) ;
57645765 var backdropClasses = classNames ( 'modal-backdrop' , fade ? 'fade' : 'show' , backdropClassName ) ;
57655766 var contentClasses = classNames ( 'modal-content' , contentClassName ) ;
57665767 var modalAttributes = returnAttributes ( {
@@ -5826,12 +5827,14 @@ Modal.defaultProps = {
58265827 autoFocus : true ,
58275828 backdrop : true ,
58285829 backdropTransitionTimeout : 150 ,
5830+ disableBackdrop : false ,
58295831 disableFocusTrap : true ,
58305832 fade : true ,
58315833 isOpen : false ,
58325834 keyboard : true ,
58335835 modalTransitionTimeout : 300 ,
58345836 overflowScroll : true ,
5837+ position : '' ,
58355838 role : 'dialog' ,
58365839 tabIndex : '-1' ,
58375840 zIndex : 1050
@@ -5845,6 +5848,7 @@ Modal.propTypes = {
58455848 children : PropTypes . node ,
58465849 className : PropTypes . string ,
58475850 contentClassName : PropTypes . string ,
5851+ disableBackdrop : PropTypes . bool ,
58485852 disableFocusTrap : PropTypes . bool ,
58495853 fade : PropTypes . bool ,
58505854 frame : PropTypes . bool ,
0 commit comments