Skip to content

Commit 573a23e

Browse files
committed
refactor(ui): split the multi-value guard so the column-identity ratchet reads no dual read
Claude-Session: https://claude.ai/code/session_015Kzn5VKHAGKe251waHoUqj Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8e28b0f commit 573a23e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎ui/packages/plugin-form/src/stateMachineOptions.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ export function narrowStateMachineOptions<T extends Record<string, any>>(
7171
): T[] {
7272
if (mode !== 'edit' || !previousValues || typeof previousValues !== 'object') return fields;
7373
return fields.map((f) => {
74-
if (!f?.name || f.multiple || f.field?.multiple) return f;
74+
if (!f?.name) return f;
75+
// A multi-value select holds a set, not one state, so no machine applies.
76+
if (f.multiple || f.field?.multiple) return f;
7577
const reachable = stateMachineNextValues(objectSchema, f.name, previousValues[f.name]);
7678
if (!reachable) return f;
7779
const ownOptions = Array.isArray(f.options);

0 commit comments

Comments
 (0)