@indico-data/design-system 1.0.44 → 1.0.45

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": "@indico-data/design-system",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "lib/index.js",
@@ -22,6 +22,7 @@ type Props = PermafrostComponent & {
22
22
 
23
23
  export const SearchInput = (props: Props) => {
24
24
  const {
25
+ id,
25
26
  border,
26
27
  showSearchIcon,
27
28
  showClearInputIcon,
@@ -34,7 +35,7 @@ export const SearchInput = (props: Props) => {
34
35
  value,
35
36
  } = props;
36
37
 
37
- const id = uuid();
38
+ const getId = id ? id : uuid();
38
39
 
39
40
  return (
40
41
  <StyledSearchField
@@ -43,10 +44,9 @@ export const SearchInput = (props: Props) => {
43
44
  showSearchIcon={showSearchIcon}
44
45
  showClearInputIcon={showClearInputIcon}
45
46
  data-cy={props['data-cy']}
46
- id={props.id}
47
47
  >
48
48
  {showSearchIcon && (
49
- <label htmlFor={id}>
49
+ <label htmlFor={getId}>
50
50
  <Icon name="fa-search" ariaLabel="search" />
51
51
  </label>
52
52
  )}
@@ -54,7 +54,7 @@ export const SearchInput = (props: Props) => {
54
54
  <input
55
55
  data-testid={props['data-testid']}
56
56
  type="search"
57
- id={id}
57
+ id={getId}
58
58
  placeholder={placeholder}
59
59
  value={value}
60
60
  onChange={onChange}