@yakad/ui 1.3.141 → 1.3.143
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.
|
@@ -42,18 +42,20 @@ export const RenderByScroll = forwardRef(function RenderByScroll(_a, ref) {
|
|
|
42
42
|
const [isVisibleLowSideLimitBox, setIsVisibleLowSideLimitBox] = useState(false);
|
|
43
43
|
// Render new Childs if needed
|
|
44
44
|
useEffect(() => {
|
|
45
|
+
const isPriorityBYHighSide = overRenderedOnHighSide < 1 ||
|
|
46
|
+
overRenderedOnHighSide - 1 <= overRenderedOnLowSide;
|
|
47
|
+
const isHighSideNewRenderRemains = rendered.highest < data.length - 1;
|
|
48
|
+
const isLowSideNewRenderRemains = rendered.lowest > 0;
|
|
45
49
|
if (!stopNewRenders) {
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
newChildRendered === null || newChildRendered === void 0 ? void 0 : newChildRendered(newHigh);
|
|
53
|
-
}
|
|
50
|
+
if (isPriorityBYHighSide &&
|
|
51
|
+
isHighSideNewRenderRemains &&
|
|
52
|
+
overRenderedOnHighSide < extraRender) {
|
|
53
|
+
const newHigh = rendered.highest + 1;
|
|
54
|
+
setRendered(Object.assign(Object.assign({}, rendered), { highest: newHigh }));
|
|
55
|
+
newChildRendered === null || newChildRendered === void 0 ? void 0 : newChildRendered(newHigh);
|
|
54
56
|
}
|
|
55
57
|
else {
|
|
56
|
-
if (
|
|
58
|
+
if (isLowSideNewRenderRemains &&
|
|
57
59
|
overRenderedOnLowSide < extraRender) {
|
|
58
60
|
if (isVisibleLowSideLimitBox) {
|
|
59
61
|
scrollTo(rendered.lowest);
|
package/dist/Stack/Stack.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
align?: "start" | "space" | "center" | "end";
|
|
4
|
+
fullWidth?: boolean;
|
|
4
5
|
children?: React.ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/Stack/Stack.js
CHANGED
|
@@ -15,7 +15,7 @@ import classNames from "classnames";
|
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./Stack.module.css";
|
|
17
17
|
export const Stack = forwardRef(function Stack(_a, ref) {
|
|
18
|
-
var { align, className, children } = _a, restProps = __rest(_a, ["align", "className", "children"]);
|
|
19
|
-
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, {
|
|
18
|
+
var { align, fullWidth, className, children } = _a, restProps = __rest(_a, ["align", "fullWidth", "className", "children"]);
|
|
19
|
+
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, { fullWidth: fullWidth }, styles.stack, className);
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|