@measured/puck 0.13.0-canary.6dfbea3 → 0.13.0-canary.d13d00b
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -33549,7 +33549,7 @@ var getClassNameItem2 = get_class_name_factory_default("ArrayFieldItem", styles_
|
|
33549
33549
|
var ArrayField = ({
|
33550
33550
|
field,
|
33551
33551
|
onChange,
|
33552
|
-
value,
|
33552
|
+
value: _value,
|
33553
33553
|
name,
|
33554
33554
|
label,
|
33555
33555
|
readOnly,
|
@@ -33557,6 +33557,7 @@ var ArrayField = ({
|
|
33557
33557
|
id
|
33558
33558
|
}) => {
|
33559
33559
|
const { state, setUi } = useAppContext();
|
33560
|
+
const value = _value;
|
33560
33561
|
const arrayState = state.ui.arrayState[id] || {
|
33561
33562
|
items: Array.from(value || []).map((item, idx) => {
|
33562
33563
|
return {
|
@@ -33666,7 +33667,7 @@ var ArrayField = ({
|
|
33666
33667
|
children: [
|
33667
33668
|
localState.arrayState.items.map((item, i) => {
|
33668
33669
|
const { _arrayId = `${id}-${i}`, _originalIndex = i } = item;
|
33669
|
-
const data = Array.from(localState.value || [])[i];
|
33670
|
+
const data = Array.from(localState.value || [])[i] || {};
|
33670
33671
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
33671
33672
|
Draggable,
|
33672
33673
|
{
|