@synerise/ds-search-bar 2.0.3 → 2.0.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@2.0.3...@synerise/ds-search-bar@2.0.4) (2026-09-16)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **search-bar:** stabilise handleInputRef so re-renders do not refocus ([69a2957](https://github.com/Synerise/synerise-design/commit/69a2957ae0af48d11d4c073af6bc724ea6800743))
11
+
6
12
  ## [2.0.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@2.0.2...@synerise/ds-search-bar@2.0.3) (2026-09-08)
7
13
 
8
14
  **Note:** Version bump only for package @synerise/ds-search-bar
package/dist/SearchBar.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import classnames from "classnames";
3
- import { forwardRef, useState, useEffect, useMemo } from "react";
3
+ import { forwardRef, useState, useCallback, useEffect, useMemo } from "react";
4
4
  import { FormattedMessage } from "react-intl";
5
5
  import { useTheme } from "@synerise/ds-core";
6
6
  import Icon, { Close3M } from "@synerise/ds-icon";
@@ -30,12 +30,12 @@ const SearchBar = forwardRef(({
30
30
  const [isFocused, setFocus] = useState(false);
31
31
  const [input, setInput] = useState();
32
32
  const [valuePrefixWidth, setValuePrefixWidth] = useState(0);
33
- const handleRef = (ref) => {
33
+ const handleRef = useCallback((ref) => {
34
34
  handleInputRef?.(ref);
35
35
  if (ref.current) {
36
36
  setInput(ref.current);
37
37
  }
38
- };
38
+ }, [handleInputRef]);
39
39
  useEffect(() => {
40
40
  if (input) {
41
41
  if (autofocus) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-search-bar",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "SearchBar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -42,11 +42,11 @@
42
42
  ],
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
- "@synerise/ds-icon": "^2.1.0",
46
- "@synerise/ds-input": "^2.0.3",
47
- "@synerise/ds-tooltip": "^2.0.2",
48
- "@synerise/ds-typography": "^2.0.2",
49
- "@synerise/ds-utils": "^2.0.0",
45
+ "@synerise/ds-icon": "^2.1.1",
46
+ "@synerise/ds-input": "^2.0.4",
47
+ "@synerise/ds-tooltip": "^2.0.3",
48
+ "@synerise/ds-typography": "^2.0.3",
49
+ "@synerise/ds-utils": "^2.1.0",
50
50
  "classnames": "^2.5.1"
51
51
  },
52
52
  "peerDependencies": {
@@ -56,5 +56,5 @@
56
56
  "styled-components": "^5.3.3",
57
57
  "vitest": "4"
58
58
  },
59
- "gitHead": "e0dced8fd3a1194eff2fafc1b7e385b29238af88"
59
+ "gitHead": "71f08fdaba8e7b80731e29a03883dc6a33f2b9db"
60
60
  }