From e8991cc90d5fd899a3357f6d1f50b382d90aad23 Mon Sep 17 00:00:00 2001 From: Harry Brand Date: Thu, 21 Mar 2024 12:06:29 +0000 Subject: [PATCH] fix: correctly infer objectFields type from props Adjusted the ObjectField type definition to ensure that properties present in Props are required and typed in the objectFields property. This resolves an issue where properties were not being inferred, leading to untyped fields. Before: image After: image --- packages/core/types/Config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/types/Config.tsx b/packages/core/types/Config.tsx index 4487753c14..f72d25f1f1 100644 --- a/packages/core/types/Config.tsx +++ b/packages/core/types/Config.tsx @@ -59,7 +59,7 @@ export type ObjectField< > = BaseField & { type: "object"; objectFields: { - [SubPropName in keyof Props[0]]: Field; + [SubPropName in keyof Props]: Field; }; };