heilhead / react-bootstrap-validation

Form validation for react-bootstrap
MIT License
136 stars 50 forks source link

Only child exception when using react-boostrap tooltip inside Form #14

Closed LoicUV closed 9 years ago

LoicUV commented 9 years ago
(...)
<Form>
    <OverlayTrigger placement="right" overlay={tooltip}>
        <Button bsStyle="default">Holy guacamole!</Button>
     </OverlayTrigger>
    (...)
</Form>

Uncaught Error: Invariant Violation: onlyChild must be passed a children with exactly one child.

Works when OverlayTrigger is placed outside of <Form> component. My guess is that it has something to do with Form cloning its children when rendering, but can't pinpoint the exact location of the issue. Any idea ?

heilhead commented 9 years ago

Thanks for the report. I'll look into it.