zds-pickers 4.5.0 → 4.5.1

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.
@@ -30,7 +30,10 @@ const Select = forwardRef((props, ref) => {
30
30
  }
31
31
  return acc.concat(entry);
32
32
  }, []);
33
- const selectedOption = flatOptionsList.find(option => value === option.value) || undefined;
33
+ // null, not undefined: react-select reads an undefined value as
34
+ // "uncontrolled" and keeps showing whatever option it showed last, so a
35
+ // value with no matching option would display the previous one's label.
36
+ const selectedOption = flatOptionsList.find(option => value === option.value) ?? null;
34
37
  const styles = useMemo(() => {
35
38
  const base = preserveMenuWidth
36
39
  ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zds-pickers",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -39,6 +39,7 @@
39
39
  "@storybook/builder-vite": "10.5.5",
40
40
  "@storybook/react": "10.5.5",
41
41
  "@storybook/react-vite": "10.5.5",
42
+ "@testing-library/react": "16.3.3",
42
43
  "@types/d3-drag": "3.0.7",
43
44
  "@types/d3-scale": "4.0.9",
44
45
  "@types/d3-selection": "3.0.11",
@@ -48,6 +49,7 @@
48
49
  "classnames": "2.5.1",
49
50
  "globals": "15.15.0",
50
51
  "immer": "10.1.1",
52
+ "jsdom": "30.0.1",
51
53
  "nodemon": "3.1.14",
52
54
  "prop-types": "15.8.1",
53
55
  "rc-slider": "11.1.8",