cr-ui-lib 1.1.89 → 1.1.91
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -463,6 +463,7 @@ interface DynamicTableV2Props {
|
|
|
463
463
|
tableSubDivRef?: React$1.Ref<HTMLDivElement>;
|
|
464
464
|
perPagesOptions?: number[];
|
|
465
465
|
tableSubInnerDivClass?: string;
|
|
466
|
+
isSowPerPage?: boolean;
|
|
466
467
|
}
|
|
467
468
|
declare const DynamicTableV2: React$1.FC<DynamicTableV2Props>;
|
|
468
469
|
|
package/dist/index.d.ts
CHANGED
|
@@ -463,6 +463,7 @@ interface DynamicTableV2Props {
|
|
|
463
463
|
tableSubDivRef?: React$1.Ref<HTMLDivElement>;
|
|
464
464
|
perPagesOptions?: number[];
|
|
465
465
|
tableSubInnerDivClass?: string;
|
|
466
|
+
isSowPerPage?: boolean;
|
|
466
467
|
}
|
|
467
468
|
declare const DynamicTableV2: React$1.FC<DynamicTableV2Props>;
|
|
468
469
|
|
package/dist/index.js
CHANGED
|
@@ -3097,8 +3097,8 @@ var MultipleAutoSuggestionInput = ({
|
|
|
3097
3097
|
enableTypingSingle,
|
|
3098
3098
|
selectedList
|
|
3099
3099
|
]);
|
|
3100
|
-
React.
|
|
3101
|
-
if (
|
|
3100
|
+
const updatePosition = React.useCallback(() => {
|
|
3101
|
+
if (containerRef.current && usePortal && isDropdownOpen) {
|
|
3102
3102
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3103
3103
|
setDropdownPosition({
|
|
3104
3104
|
top: rect.bottom + window.scrollY,
|
|
@@ -3107,6 +3107,21 @@ var MultipleAutoSuggestionInput = ({
|
|
|
3107
3107
|
});
|
|
3108
3108
|
}
|
|
3109
3109
|
}, [isDropdownOpen, usePortal]);
|
|
3110
|
+
React.useLayoutEffect(() => {
|
|
3111
|
+
if (!isDropdownOpen || !usePortal) return;
|
|
3112
|
+
updatePosition();
|
|
3113
|
+
window.addEventListener("scroll", updatePosition, {
|
|
3114
|
+
capture: true,
|
|
3115
|
+
passive: true
|
|
3116
|
+
});
|
|
3117
|
+
window.addEventListener("resize", updatePosition);
|
|
3118
|
+
return () => {
|
|
3119
|
+
window.removeEventListener("scroll", updatePosition, {
|
|
3120
|
+
capture: true
|
|
3121
|
+
});
|
|
3122
|
+
window.removeEventListener("resize", updatePosition);
|
|
3123
|
+
};
|
|
3124
|
+
}, [isDropdownOpen, usePortal, updatePosition]);
|
|
3110
3125
|
const handleInputChange = (e) => {
|
|
3111
3126
|
setInputValue(e.target.value);
|
|
3112
3127
|
onChange(e);
|
|
@@ -4870,7 +4885,8 @@ var DynamicTableV2 = ({
|
|
|
4870
4885
|
tableSubDivClass = "",
|
|
4871
4886
|
tableSubInnerDivClass = "",
|
|
4872
4887
|
tableSubDivRef,
|
|
4873
|
-
perPagesOptions = [10, 20, 50, 100]
|
|
4888
|
+
perPagesOptions = [10, 20, 50, 100],
|
|
4889
|
+
isSowPerPage = true
|
|
4874
4890
|
}) => {
|
|
4875
4891
|
var _a, _b;
|
|
4876
4892
|
const tableRef = React.useRef(null);
|
|
@@ -5130,7 +5146,7 @@ var DynamicTableV2 = ({
|
|
|
5130
5146
|
pageRangeDisplayed: pagination == null ? void 0 : pagination.pageRangeDisplayed
|
|
5131
5147
|
}
|
|
5132
5148
|
) }),
|
|
5133
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
5149
|
+
isSowPerPage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
5134
5150
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5135
5151
|
"span",
|
|
5136
5152
|
{
|