@oliasoft-open-source/react-ui-library 5.8.0-beta-5 → 5.8.0-beta-6
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/index.js +12 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3653,34 +3653,26 @@ const Cell = ({ cell: e, isHeader: t, columnHeaderAlignment: n, columnAlignment:
|
|
|
3653
3653
|
})
|
|
3654
3654
|
});
|
|
3655
3655
|
};
|
|
3656
|
-
var ScrollToActiveRow = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => {
|
|
3657
|
-
|
|
3656
|
+
var ScrollToActiveRow = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (useEffect(() => {
|
|
3657
|
+
if (t && !(e == null || e < 0)) {
|
|
3658
3658
|
if (n && r) r.scrollToIndex(e, {
|
|
3659
|
-
|
|
3660
|
-
|
|
3659
|
+
behavior: "auto",
|
|
3660
|
+
align: "center"
|
|
3661
3661
|
});
|
|
3662
|
-
else {
|
|
3662
|
+
else if (!n) {
|
|
3663
3663
|
let t = document.querySelector(`tr[data-index="${e}"]`);
|
|
3664
3664
|
t && t.scrollIntoView({
|
|
3665
3665
|
behavior: "auto",
|
|
3666
3666
|
block: "center"
|
|
3667
3667
|
});
|
|
3668
3668
|
}
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
a.cancel();
|
|
3677
|
-
};
|
|
3678
|
-
}, [
|
|
3679
|
-
e,
|
|
3680
|
-
t,
|
|
3681
|
-
a
|
|
3682
|
-
]), null;
|
|
3683
|
-
};
|
|
3669
|
+
}
|
|
3670
|
+
}, [
|
|
3671
|
+
e,
|
|
3672
|
+
t,
|
|
3673
|
+
n,
|
|
3674
|
+
r
|
|
3675
|
+
]), null);
|
|
3684
3676
|
const TableScrollWrapper = ({ table: e, theadRef: t, children: n }) => {
|
|
3685
3677
|
let { infiniteScroll: r = !1, triggerScrollToActiveRow: i = !1, rows: a } = e, o = useMemo(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(a) && a.length ? a.findIndex((e) => e && e.active) : -1, [a, e.activeRowIndex]);
|
|
3686
3678
|
return r ? /* @__PURE__ */ jsx(TableVirtualScrollWrapper, {
|
package/package.json
CHANGED