Skip to content

Commit ed0a797

Browse files
committed
[fields] Fix oneOf/anyOf fields
1 parent 6a649fd commit ed0a797

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/tangy-queens-doubt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@sjsf/form": patch
3+
---
4+
5+
Fix oneOf/anyOf fields

packages/form/src/fields/combination.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
const restType = getSimpleSchemaType(restSchema);
6565
return {
6666
...config,
67-
schema: restType === "unknown" ? {} : restSchema,
68-
};
67+
schema: restType === "unknown" ? { type: "object" } : restSchema,
68+
} satisfies Config;
6969
});
7070
const RestSchemaField = $derived(
7171
restFieldConfig && getFieldComponent(ctx, restFieldConfig)

0 commit comments

Comments
 (0)