I had tooltips working earlier and am trying to port my component to React. I am not using the bootstrap reaction yet because I'm not sure if I am going to, because it is still in heavy development, not 1.0.
Here is a snippet of my rendering code:
<span> <input data-toggle="tooltip" ref="test" title={this.props.tooltip} type="radio" name="rGroup" id={"r" + this.props.name} /> <label className="btn btn-default" htmlFor={"r" + this.props.name}></label> </span>
And calling him:
<MyComponent name="apple" tooltip="banana" />
I know that you need to call the tooltip function in order for it to appear, and I think where I got confused. I'm currently trying to do something like this:
componentDidMount() { $(this.refs.test).tooltip(); // this.refs.test.tooltip(); ? // $('[data-toggle="tooltip"]').tooltip(); ? }
But none of this works. Tooltip is not displayed.
source share