@@ -5,7 +5,7 @@ import createChainedFunction from './utils/createChainedFunction';
5
5
import createContextWrapper from './utils/createContextWrapper' ;
6
6
import Overlay from './Overlay' ;
7
7
import warning from 'react/lib/warning' ;
8
-
8
+ import pick from 'lodash/object/pick' ;
9
9
/**
10
10
* Check if value one is inside or equal to the of value
11
11
*
@@ -146,24 +146,26 @@ const OverlayTrigger = React.createClass({
146
146
} ,
147
147
148
148
getOverlay ( ) {
149
- let props = {
150
- show : this . state . isOverlayShown ,
151
- onHide : this . hide ,
152
- rootClose : this . props . rootClose ,
153
- animation : this . props . animation ,
149
+ let overlayProps = {
150
+ ...pick ( this . props , Object . keys ( Overlay . propTypes ) ) ,
151
+ show : this . state . isOverlayShown ,
152
+ onHide : this . hide ,
154
153
target : this . getOverlayTarget ,
155
- placement : this . props . placement ,
156
- container : this . props . container ,
157
- containerPadding : this . props . containerPadding
154
+ onExit : this . props . onExit ,
155
+ onExiting : this . props . onExiting ,
156
+ onExited : this . props . onExited ,
157
+ onEnter : this . props . onEnter ,
158
+ onEntering : this . props . onEntering ,
159
+ onEntered : this . props . onEntered
158
160
} ;
159
161
160
162
let overlay = cloneElement ( this . props . overlay , {
161
- placement : props . placement ,
162
- container : props . container
163
+ placement : overlayProps . placement ,
164
+ container : overlayProps . container
163
165
} ) ;
164
166
165
167
return (
166
- < Overlay { ...props } >
168
+ < Overlay { ...overlayProps } >
167
169
{ overlay }
168
170
</ Overlay >
169
171
) ;
0 commit comments