@festo-ui/react 7.3.0-dev.475 → 7.3.0-dev.476

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.
@@ -1,6 +1,6 @@
1
- import { Key, Ref } from 'react';
2
- import { SelectConfiguration } from '../../../helper/types';
3
- import { SelectOptionType } from '../select-option/SelectOption';
1
+ import { Key, Ref } from "react";
2
+ import { SelectConfiguration } from "../../../helper/types";
3
+ import { SelectOptionType } from "../select-option/SelectOption";
4
4
  interface SelectOptionsContainerProps<T> {
5
5
  options?: SelectOptionType<T>[];
6
6
  config?: SelectConfiguration;
@@ -1,5 +1,5 @@
1
- import { createRef, forwardRef, isValidElement, useEffect, useRef, useState } from 'react';
2
- import { usePopper } from 'react-popper';
1
+ import { createRef, forwardRef, isValidElement, useEffect, useRef, useState } from "react";
2
+ import { usePopper } from "react-popper";
3
3
  import SelectScrollContainer from "./SelectScrollContainer.js";
4
4
  import ListItem from "./ListItem.js";
5
5
  import getChildren from "./utils.js";
@@ -17,21 +17,21 @@ function SelectOptionsContainerComponent(_ref, ref) {
17
17
  children
18
18
  } = _ref;
19
19
  const [popperElement, setPopperElement] = useState(null);
20
- const refObject = typeof ref !== 'function' ? ref?.current : null;
20
+ const refObject = typeof ref !== "function" ? ref?.current : null;
21
21
  const {
22
22
  styles,
23
23
  attributes
24
24
  } = usePopper(refObject, popperElement, {
25
- placement: 'bottom-start',
25
+ placement: "bottom-start",
26
26
  modifiers: [{
27
- name: 'offset',
27
+ name: "offset",
28
28
  options: {
29
29
  offset: [0, 3]
30
30
  }
31
31
  }, {
32
- name: 'flip',
32
+ name: "flip",
33
33
  options: {
34
- fallbackPlacements: ['bottom-start', 'top-start']
34
+ fallbackPlacements: ["bottom-start", "top-start"]
35
35
  }
36
36
  }]
37
37
  });
@@ -68,10 +68,10 @@ function SelectOptionsContainerComponent(_ref, ref) {
68
68
  });
69
69
  }
70
70
  }, [selectedIndex, init]);
71
- const onCloseRef = useRef(onClose);
72
- useEffect(() => () => {
73
- onCloseRef.current();
74
- }, []);
71
+
72
+ // here was the unmount code. I removed it because it was causing problem during debug (StrictMode)
73
+ // Tuan: Please check if it's necessary to add it back
74
+
75
75
  return /*#__PURE__*/_jsxs(_Fragment, {
76
76
  children: [/*#__PURE__*/_jsx("div", {
77
77
  "aria-hidden": true,
@@ -22,21 +22,21 @@ function SelectOptionsContainerComponent(_ref, ref) {
22
22
  children
23
23
  } = _ref;
24
24
  const [popperElement, setPopperElement] = (0, _react.useState)(null);
25
- const refObject = typeof ref !== 'function' ? ref?.current : null;
25
+ const refObject = typeof ref !== "function" ? ref?.current : null;
26
26
  const {
27
27
  styles,
28
28
  attributes
29
29
  } = (0, _reactPopper.usePopper)(refObject, popperElement, {
30
- placement: 'bottom-start',
30
+ placement: "bottom-start",
31
31
  modifiers: [{
32
- name: 'offset',
32
+ name: "offset",
33
33
  options: {
34
34
  offset: [0, 3]
35
35
  }
36
36
  }, {
37
- name: 'flip',
37
+ name: "flip",
38
38
  options: {
39
- fallbackPlacements: ['bottom-start', 'top-start']
39
+ fallbackPlacements: ["bottom-start", "top-start"]
40
40
  }
41
41
  }]
42
42
  });
@@ -73,10 +73,10 @@ function SelectOptionsContainerComponent(_ref, ref) {
73
73
  });
74
74
  }
75
75
  }, [selectedIndex, init]);
76
- const onCloseRef = (0, _react.useRef)(onClose);
77
- (0, _react.useEffect)(() => () => {
78
- onCloseRef.current();
79
- }, []);
76
+
77
+ // here was the unmount code. I removed it because it was causing problem during debug (StrictMode)
78
+ // Tuan: Please check if it's necessary to add it back
79
+
80
80
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
81
81
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
82
82
  "aria-hidden": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "7.3.0-dev.475",
3
+ "version": "7.3.0-dev.476",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "type": "module",