diff --git a/packages/forms/src/config/elements/sequence.ts b/packages/forms/src/config/elements/sequence.ts index 5598f52c..3629989f 100644 --- a/packages/forms/src/config/elements/sequence.ts +++ b/packages/forms/src/config/elements/sequence.ts @@ -14,7 +14,7 @@ export const sequenceConfig: FormElementConfig = { return obj; }, getChildren(element, elements) { - return (element as SequenceElement).data.elements.map( + return element.data.elements.map( (elementId: string) => elements[elementId] ); }, diff --git a/packages/forms/src/config/index.ts b/packages/forms/src/config/index.ts index 897751d6..34c2c0ab 100644 --- a/packages/forms/src/config/index.ts +++ b/packages/forms/src/config/index.ts @@ -15,5 +15,6 @@ export type FormConfig = FormElement> = { elements: Record>; }; -export type ConfigElements = - keyof Config['elements']; +export type ConfigElements = ReturnType< + Config['elements'][keyof Config['elements']]['parseData'] +>;