@eightshift/ui-components 1.4.2 → 1.4.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.
|
@@ -5086,6 +5086,9 @@ const Repeater = (props) => {
|
|
|
5086
5086
|
if (canDelete && items.length < (minItems ?? 1)) {
|
|
5087
5087
|
setCanDelete(false);
|
|
5088
5088
|
}
|
|
5089
|
+
useEffect(() => {
|
|
5090
|
+
setItems(fixIds(rawItems));
|
|
5091
|
+
}, [rawItems]);
|
|
5089
5092
|
if (hidden) {
|
|
5090
5093
|
return null;
|
|
5091
5094
|
}
|
|
@@ -5218,8 +5221,9 @@ const Repeater = (props) => {
|
|
|
5218
5221
|
children({
|
|
5219
5222
|
...item,
|
|
5220
5223
|
updateData: (newValue) => {
|
|
5221
|
-
|
|
5222
|
-
onChange(
|
|
5224
|
+
const updated = [...items].map((i2) => i2.id === item.id ? { ...i2, ...newValue } : i2);
|
|
5225
|
+
onChange(updated);
|
|
5226
|
+
setItems(updated);
|
|
5223
5227
|
},
|
|
5224
5228
|
itemIndex: index,
|
|
5225
5229
|
deleteItem: () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/ui-components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"tailwindcss": "^3.4.7",
|
|
86
86
|
"tailwindcss-animate": "^1.0.7",
|
|
87
87
|
"tailwindcss-react-aria-components": "^1.1.4",
|
|
88
|
+
"tailwindcss-scoped-preflight": "^3.4.3",
|
|
88
89
|
"vite": "^5.3.5",
|
|
89
90
|
"vite-plugin-lib-inject-css": "^2.1.1"
|
|
90
91
|
},
|