React-tooltip: Tooltip redering twice in two seperate positions

Created on 9 Oct 2017  路  4Comments  路  Source: wwayne/react-tooltip

image

<div
                                                className="btn-greyed-out"
                                                data-tip={"Veuillez S'il vous pla卯t d'abords fournir des modifications au template "+ currentTemplate + "."}
                                            >
                                                <div><i className="fa fa-floppy-o" /> Sauvegarder en Template</div>
                                            </div>
                                            <ReactTooltip place="top" type="info" effect="solid" />

why is it doing this?

If I place it left or right it shows on the left in both of those case and not on top (also you'll notice the one on the left is darker making me think there's 2 or more showing on the left.

Most helpful comment

you must write "data-for" in your component and will reference with "id" to "data-for".
for example:

All 4 comments

@tatsujb Check if you don't create <ReactTooltip /> within a loop, but outside

you must write "data-for" in your component and will reference with "id" to "data-for".
for example:

I'm getting this issue but I implemented data-for with a match the tooltip id

I had this issue with data-for and id as well, the solution for me was to set a more unique identifier/a combination of a word and a variable that I was getting from the parent component (i.e. id=`tooltip-${parent.id}`).

Heres the same issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mir3z picture mir3z  路  5Comments

kristinadarroch picture kristinadarroch  路  3Comments

lovetann picture lovetann  路  3Comments

Q-Man picture Q-Man  路  3Comments

rothwelljeff picture rothwelljeff  路  3Comments