@centreon/ui 26.3.15 → 26.3.17

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "26.3.15",
3
+ "version": "26.3.17",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -145,6 +145,7 @@ const ConnectedAutocomplete = ({
145
145
  getEndpoint={getEndpoint}
146
146
  getOptionLabel={connectedAutocomplete?.getOptionLabel}
147
147
  getRenderedOptionText={connectedAutocomplete?.getRenderedOptionText}
148
+ helperText={connectedAutocomplete?.helperText}
148
149
  initialPage={1}
149
150
  isOptionEqualToValue={isOptionEqualToValue}
150
151
  label={t(label)}
@@ -63,6 +63,7 @@ export interface InputProps {
63
63
  filterKey?: string;
64
64
  getRenderedOptionText?: (option) => string | JSX.Element;
65
65
  getOptionLabel?: (option) => string;
66
+ helperText?: string;
66
67
  optionProperty?: string;
67
68
  disableSelectAll?: boolean;
68
69
  limitTags?: number;
@@ -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, options]);
44
+ }, [element, JSON.stringify(sanitizedOptions)]);
40
45
 
41
46
  return {
42
47
  isInViewport: entry?.isIntersecting ?? true,