agroptima-design-system 0.32.2 → 0.32.3-beta.0

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": "agroptima-design-system",
3
- "version": "0.32.2",
3
+ "version": "0.32.3-beta.0",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -67,7 +67,6 @@ export function Select({
67
67
  }
68
68
 
69
69
  function handleClear(event: React.MouseEvent) {
70
- if (disabled) return
71
70
  event.stopPropagation()
72
71
  setSelectedOption(EMPTY_OPTION)
73
72
  onChange('')
@@ -27,6 +27,10 @@ export function SelectTrigger({
27
27
  isEmpty,
28
28
  children,
29
29
  }: SelectTriggerProps) {
30
+ const handleClear = (event: React.MouseEvent) => {
31
+ if (disabled) return
32
+ onClear(event)
33
+ }
30
34
  return (
31
35
  <div className="select-container">
32
36
  <button
@@ -51,11 +55,12 @@ export function SelectTrigger({
51
55
  />
52
56
  </button>
53
57
  <IconButton
58
+ type="button"
54
59
  size="3"
55
60
  icon="Close"
56
61
  className="clear-button"
57
62
  accessibilityLabel="close"
58
- onClick={onClear}
63
+ onClick={handleClear}
59
64
  visible={!isEmpty}
60
65
  />
61
66
  </div>