@true-engineering/true-react-common-ui-kit 3.0.0-alpha.11 → 3.0.0-alpha.12

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.
@@ -22307,6 +22307,7 @@ function FlexibleTable(param) {
22307
22307
  currentComponentName: "FlexibleTable"
22308
22308
  });
22309
22309
  var _useState = _sliced_to_array$8(useState(false), 2), isHorizontallyScrolled = _useState[0], setIsHorizontallyScrolled = _useState[1];
22310
+ var _useState1 = _sliced_to_array$8(useState(false), 2), hasScrollBar = _useState1[0], setHasScrollBar = _useState1[1];
22310
22311
  var observer = useRef();
22311
22312
  var scrollRef = useRef(null);
22312
22313
  var ref = refForScroll !== null && refForScroll !== void 0 ? refForScroll : scrollRef;
@@ -22337,6 +22338,7 @@ function FlexibleTable(param) {
22337
22338
  if (scrollContainer === null || !isHorizontallyScrollable || !isFirstColumnSticky) {
22338
22339
  return;
22339
22340
  }
22341
+ setHasScrollBar(hasHorizontalScrollBar(scrollContainer));
22340
22342
  var scrollHandler = function(e) {
22341
22343
  setIsHorizontallyScrolled(e.target.scrollLeft > 0);
22342
22344
  };
@@ -22345,7 +22347,7 @@ function FlexibleTable(param) {
22345
22347
  return scrollContainer.removeEventListener("scroll", scrollHandler);
22346
22348
  };
22347
22349
  }, [
22348
- scrollRef
22350
+ ref
22349
22351
  ]);
22350
22352
  var _activeRows_includes;
22351
22353
  return /* @__PURE__ */ jsx("div", _object_spread_props$e(_object_spread$f({
@@ -22353,7 +22355,7 @@ function FlexibleTable(param) {
22353
22355
  className: clsx(_define_property$g({}, classes.scroll, isHorizontallyScrollable))
22354
22356
  }, addDataAttributes({
22355
22357
  scrolled: isHorizontallyScrolled ? true : void 0,
22356
- scrollable: isHorizontallyScrollable && hasHorizontalScrollBar(ref.current) ? true : void 0
22358
+ scrollable: isHorizontallyScrollable && hasScrollBar ? true : void 0
22357
22359
  })), {
22358
22360
  children: /* @__PURE__ */ jsxs("table", _object_spread_props$e(_object_spread$f({
22359
22361
  className: classes.root