You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
function getTarget(target) {
var els = findDOMElements(target);
if (isArrayOrNodeList(els)) {
return els[0];
}
return els;
}
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 through NodeList and apply the addEventListener.
The text was updated successfully, but these errors were encountered:
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: