Skip to content

Commit 9941b41

Browse files
committed
fix: fix bug override schema types
1 parent a93f737 commit 9941b41

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/v2/logic/createForm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ const createForm = <TSchema>(props: ICreateFormProps<TSchema>) => {
360360
) => {
361361
if (!schema.overrides) return;
362362

363-
for (const { condition, expression, values } of schema.overrides) {
363+
for (const { condition = true, expression, values } of schema.overrides) {
364364
if (!expression) {
365365
setValues(structuredClone(values), { skipNotify: true });
366366
break;

src/v2/types/schema.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export interface IOverrideSchema extends ISchemaCore {
88
}
99

1010
export interface IOverrideField {
11-
condition: boolean;
12-
expression: IExpressionString;
11+
condition?: boolean;
12+
expression?: IExpressionString;
1313
values: any;
1414
}
1515

0 commit comments

Comments
 (0)