@true-engineering/true-react-common-ui-kit 3.0.0-alpha.13 → 3.0.0-alpha.15
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.
|
@@ -22339,16 +22339,21 @@ function FlexibleTable(param) {
|
|
|
22339
22339
|
]);
|
|
22340
22340
|
useEffect(function() {
|
|
22341
22341
|
var scrollContainer = ref.current;
|
|
22342
|
-
if (scrollContainer
|
|
22342
|
+
if (isEmpty(scrollContainer) || !isHorizontallyScrollable || !isFirstColumnSticky) {
|
|
22343
22343
|
return;
|
|
22344
22344
|
}
|
|
22345
|
-
|
|
22346
|
-
|
|
22347
|
-
setIsHorizontallyScrolled(e.target.scrollLeft > 0);
|
|
22345
|
+
var scrollHandler = function() {
|
|
22346
|
+
setIsHorizontallyScrolled(scrollContainer.scrollLeft > 0);
|
|
22348
22347
|
};
|
|
22348
|
+
var resizeHandler = function() {
|
|
22349
|
+
setHasScrollBar(hasHorizontalScrollBar(scrollContainer));
|
|
22350
|
+
};
|
|
22351
|
+
resizeHandler();
|
|
22349
22352
|
scrollContainer.addEventListener("scroll", scrollHandler);
|
|
22353
|
+
window.addEventListener("resize", resizeHandler);
|
|
22350
22354
|
return function() {
|
|
22351
|
-
|
|
22355
|
+
scrollContainer.removeEventListener("scroll", scrollHandler);
|
|
22356
|
+
window.removeEventListener("resize", resizeHandler);
|
|
22352
22357
|
};
|
|
22353
22358
|
}, [
|
|
22354
22359
|
ref
|