@momentum-design/components 0.76.6 → 0.76.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,6 +128,10 @@ class ListItem extends DisabledMixin(TabIndexMixin(Component)) {
|
|
128
128
|
}
|
129
129
|
// Add a unique id to the listitem if it does not have one to attach the tooltip.
|
130
130
|
this.id = this.id || LISTITEM_ID;
|
131
|
+
// Remove any existing tooltip.
|
132
|
+
const existingTooltip = document.getElementById(TOOLTIP_ID);
|
133
|
+
if (existingTooltip)
|
134
|
+
existingTooltip.remove();
|
131
135
|
// Create tooltip for the listitem element.
|
132
136
|
const tooltip = document.createElement(TOOLTIP_TAG_NAME);
|
133
137
|
tooltip.id = TOOLTIP_ID;
|