Skip to content

Commit 6b8a940

Browse files
committed
Merge pull request react-bootstrap#1015 from taion/OverlayTrigger-animation
Forward animation prop to Overlay from trigger
2 parents e2bad35 + cb6fc61 commit 6b8a940

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/OverlayTrigger.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ function isOneOf(one, of) {
2121
}
2222

2323
const OverlayTrigger = React.createClass({
24-
2524
propTypes: {
2625

2726
...Overlay.propTypes,
@@ -142,12 +141,17 @@ const OverlayTrigger = React.createClass({
142141
React.render(this._overlay, this._mountNode);
143142
},
144143

145-
getOverlay(){
144+
getOverlayTarget() {
145+
return React.findDOMNode(this);
146+
},
147+
148+
getOverlay() {
146149
let props = {
147150
show: this.state.isOverlayShown,
148151
onHide: this.hide,
149152
rootClose: this.props.rootClose,
150-
target: ()=> React.findDOMNode(this),
153+
animation: this.props.animation,
154+
target: this.getOverlayTarget,
151155
placement: this.props.placement,
152156
container: this.props.container,
153157
containerPadding: this.props.containerPadding

0 commit comments

Comments
 (0)