@centreon/ui 26.3.15 → 26.3.16
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/package.json
CHANGED
|
@@ -395,7 +395,7 @@ const getScale = ({
|
|
|
395
395
|
: getMin(graphValues),
|
|
396
396
|
!isEmpty(stackedValues) &&
|
|
397
397
|
!equals(stackedValues, [0]) &&
|
|
398
|
-
getMin(stackedValues),
|
|
398
|
+
getMin([0, ...stackedValues]),
|
|
399
399
|
Math.min(...thresholds)
|
|
400
400
|
]);
|
|
401
401
|
const minValue = Math.min(...sanitizedValuesForMinimum.filter(isNotNil));
|
|
@@ -18,6 +18,11 @@ export const useViewportIntersection = (
|
|
|
18
18
|
const [element, setElement] = useState<HTMLElement | null>(null);
|
|
19
19
|
|
|
20
20
|
const observer = useRef<IntersectionObserver | null>(null);
|
|
21
|
+
|
|
22
|
+
const sanitizedOptions = {
|
|
23
|
+
...options,
|
|
24
|
+
root: options?.root instanceof HTMLElement ? `${options.root.tagName}_${options.root.className}` : null
|
|
25
|
+
}
|
|
21
26
|
|
|
22
27
|
useEffect(() => {
|
|
23
28
|
if (observer.current) {
|
|
@@ -36,7 +41,7 @@ export const useViewportIntersection = (
|
|
|
36
41
|
return (): void => {
|
|
37
42
|
observer.current?.disconnect();
|
|
38
43
|
};
|
|
39
|
-
}, [element,
|
|
44
|
+
}, [element, JSON.stringify(sanitizedOptions)]);
|
|
40
45
|
|
|
41
46
|
return {
|
|
42
47
|
isInViewport: entry?.isIntersecting ?? true,
|