@@ -5,7 +5,7 @@ import createChainedFunction from './utils/createChainedFunction';
55import createContextWrapper from './utils/createContextWrapper' ;
66import Overlay from './Overlay' ;
77import warning from 'react/lib/warning' ;
8-
8+ import pick from 'lodash/object/pick' ;
99/**
1010 * Check if value one is inside or equal to the of value
1111 *
@@ -146,24 +146,26 @@ const OverlayTrigger = React.createClass({
146146 } ,
147147
148148 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 ,
154153 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
158160 } ;
159161
160162 let overlay = cloneElement ( this . props . overlay , {
161- placement : props . placement ,
162- container : props . container
163+ placement : overlayProps . placement ,
164+ container : overlayProps . container
163165 } ) ;
164166
165167 return (
166- < Overlay { ...props } >
168+ < Overlay { ...overlayProps } >
167169 { overlay }
168170 </ Overlay >
169171 ) ;
0 commit comments