@royaloperahouse/harmonic 0.11.0-k → 0.11.0-l
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/dist/harmonic.cjs.development.js +13 -5
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +13 -5
- package/dist/harmonic.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -6211,11 +6211,19 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
6211
6211
|
}, 500);
|
|
6212
6212
|
}, []);
|
|
6213
6213
|
React.useEffect(function () {
|
|
6214
|
-
|
|
6215
|
-
var
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6214
|
+
if (typeof window === 'undefined') return undefined;
|
|
6215
|
+
var handleResize = function handleResize() {
|
|
6216
|
+
var _tabListRef$current, _tabListRef$current2;
|
|
6217
|
+
var tabsIsOverflowed = (((_tabListRef$current = tabListRef.current) == null ? void 0 : _tabListRef$current.scrollWidth) || 0) > (((_tabListRef$current2 = tabListRef.current) == null ? void 0 : _tabListRef$current2.clientWidth) || 0);
|
|
6218
|
+
setTabsOverflow(tabsIsOverflowed);
|
|
6219
|
+
setCanScrollToRight(tabsIsOverflowed);
|
|
6220
|
+
};
|
|
6221
|
+
window.addEventListener('resize', handleResize);
|
|
6222
|
+
handleResize(); // Initial check
|
|
6223
|
+
return function () {
|
|
6224
|
+
window.removeEventListener('resize', handleResize);
|
|
6225
|
+
};
|
|
6226
|
+
}, []);
|
|
6219
6227
|
React.useEffect(function () {
|
|
6220
6228
|
var scrollTriggerCheck = function scrollTriggerCheck() {
|
|
6221
6229
|
var elementGap = 100;
|