@salesforcedevs/dx-components 1.3.210-lnb16-alpha → 1.3.210-lnb18-alpha
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 +1 -1
- package/src/modules/dx/sidebar/sidebar.css +1 -1
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +1 -0
- package/src/modules/dxBaseElements/sidebarBase/sidebarBase.ts +19 -6
- package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +1 -1
- package/src/modules/dxHelpers/commonTreeItem/commonTreeItem.css +1 -0
package/package.json
CHANGED
|
@@ -48,15 +48,28 @@ export class SidebarBase extends LightningElement {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
@track showBoxShadow = false;
|
|
51
|
+
private scrolling = false;
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
/**
|
|
54
|
+
* This method is to handle the scroll event for LNB and show box shadow
|
|
55
|
+
* @param scrollEvent
|
|
56
|
+
*/
|
|
57
|
+
handleScroll(scrollEvent: any) {
|
|
53
58
|
const lnb = scrollEvent.target;
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
if (!this.scrolling) {
|
|
61
|
+
this.scrolling = true;
|
|
62
|
+
// Set a timeout to handle scroll event after a delay
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
// Check if lnb is scrolled
|
|
65
|
+
if (lnb.scrollTop > 0 && lnb.scrollHeight > lnb.clientHeight) {
|
|
66
|
+
this.showBoxShadow = true;
|
|
67
|
+
} else {
|
|
68
|
+
this.showBoxShadow = false;
|
|
69
|
+
}
|
|
70
|
+
// Reset scrolling back to false after handling the scroll
|
|
71
|
+
this.scrolling = false;
|
|
72
|
+
}, 200);
|
|
60
73
|
}
|
|
61
74
|
}
|
|
62
75
|
|