diff --git a/craft/src/panels/right/styles/ArrayItemFields.tsx b/craft/src/panels/right/styles/ArrayItemFields.tsx index b2bb96c..7551b9a 100644 --- a/craft/src/panels/right/styles/ArrayItemFields.tsx +++ b/craft/src/panels/right/styles/ArrayItemFields.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef } from 'react'; import { useEditor } from '@craftjs/core'; -import { CollapsibleSection, ArrayPropEditor, smallInputStyle } from './shared'; +import { CollapsibleSection, ArrayPropEditor, smallInputStyle, continuousSetProp } from './shared'; import { useLayerFocus } from '../../left/LayerFocusContext'; /* ---------- Shared array-item field editor ---------- @@ -52,7 +52,7 @@ export const ArrayItemFieldsEditor: React.FC<{ selectedId: string; propKey: stri data-array-item={`${propKey}:${index}`} value={String(item)} onChange={(e) => { - actions.setProp(selectedId, (props: any) => { + continuousSetProp(actions, selectedId, `${propKey}:${index}`, (props: any) => { const updated = [...(props[propKey] || [])]; updated[index] = e.target.value; props[propKey] = updated; @@ -85,7 +85,7 @@ export const ArrayItemFieldsEditor: React.FC<{ selectedId: string; propKey: stri