@salesforcedevs/dx-components 1.3.34-TableAlignment → 1.3.34-toc1
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.
package/package.json
CHANGED
|
@@ -97,10 +97,18 @@ export default class TreeItem extends LightningElement {
|
|
|
97
97
|
this.sendGtm(event);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
private
|
|
101
|
-
if
|
|
100
|
+
private preventDefaultLinkBehavior(event: Event) {
|
|
101
|
+
// prevent page refresh if href isn't present or link is already active
|
|
102
|
+
if (
|
|
103
|
+
!this._treeNode.link?.href ||
|
|
104
|
+
this._treeNode.link?.href === window.location.pathname
|
|
105
|
+
) {
|
|
102
106
|
event.preventDefault();
|
|
103
107
|
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private onLinkClick(event: Event): void {
|
|
111
|
+
this.preventDefaultLinkBehavior(event);
|
|
104
112
|
|
|
105
113
|
if (this.isParent) {
|
|
106
114
|
const isSelectAction = true;
|