@orsetra/shared-ui 1.5.20 → 1.5.21

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.
@@ -57,8 +57,10 @@ export function ResourcesInput({ id, value, onChange, disabled = false, ...rest
57
57
  }, [value])
58
58
 
59
59
  const handleAdd = () => {
60
- if (!draft || items.includes(draft)) return
61
- const next = [...items, draft]
60
+ if (!draft) return
61
+ const built = normalize([draft])[0]
62
+ if (!built || items.includes(built)) return
63
+ const next = [...items, built]
62
64
  setItems(next)
63
65
  onChange?.(next)
64
66
  setDraft("")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.5.20",
3
+ "version": "1.5.21",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",