Skip to content

Commit ce5aa8b

Browse files
committed
Fix for manual mode of OverlayTrigger.
Before this fix it was not possible to refer to the component wrapped by the OverlayTrigger using the ref property, because it was not cloned using cloneWithProps. Now, in manuel mode, we just return the unmodified child which will still have the ref and all children. (cherry picked from commit 4e54431)
1 parent 230ca05 commit ce5aa8b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/OverlayTrigger.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ var OverlayTrigger = React.createClass({
8989
},
9090

9191
render: function () {
92+
if (this.props.trigger === 'manual') {
93+
return React.Children.only(this.props.children);
94+
}
95+
9296
var props = {};
9397

9498
if (isOneOf('click', this.props.trigger)) {

0 commit comments

Comments
 (0)