-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip only show for first element #1185
Tooltip only show for first element #1185
Comments
bootstrap works different and perhaps we should look into working more similar to how bootstrap does for this. |
HI there, nobody interested in fixing this? Cheers |
Definitely need a fix for this |
I have fixed this, demo with the fix - https://stackblitz.com/edit/react-k8rkzv |
* fix(Tooltip single target):Support for multiple target elements using css selector #1185 * fix(Tooltip single target):Removed onClosed handler as it was redundant #1185 * fix(Tooltip single target):isOpen state can control first element only #1185 * fix(Tooltip single target):Added unit tests #1185
…over event (fixes reintroduced bug)
reactstrap version 6.4
react verison 16.4.2
bootstrap 4
In cases where there are elements with the same ID created through a loop or rendered from reusable components, the tooltip only show for the first element with the ID.
I try to fix it myself but I lack the knowledge of reading other people's code. The issue, I suspect lies here
It's always returning the first element of the list, even when there are more than one elements. In the original bootstrap 4, it initializes tooltip for any elements with the attribute
data-toggle
(from the example), thus allowing same tooltip to show on different same elements. Consider using a loop to loop throughNodeList
and apply theaddEventListener
.The text was updated successfully, but these errors were encountered: