diff --git a/packages/ui-solid/src/components/XForm/containers/XFormGroup.tsx b/packages/ui-solid/src/components/XForm/containers/XFormGroup.tsx index 0f3803245..c7f652015 100644 --- a/packages/ui-solid/src/components/XForm/containers/XFormGroup.tsx +++ b/packages/ui-solid/src/components/XForm/containers/XFormGroup.tsx @@ -28,7 +28,7 @@ const groupNode = (node: GroupNode | RepeatRangeNode): GroupNode | null => { export const XFormGroup = (props: XFormGroupProps) => { const groupLabel = () => { - if (props.node.definition.type === 'repeat-sequence') { + if (props.node.nodeType === 'repeat-range') { return null; } diff --git a/packages/web-forms/src/components/QuestionList.vue b/packages/web-forms/src/components/QuestionList.vue index 16cf60bca..b0b8a3594 100644 --- a/packages/web-forms/src/components/QuestionList.vue +++ b/packages/web-forms/src/components/QuestionList.vue @@ -6,11 +6,17 @@ import RepeatRange from './RepeatRange.vue'; defineProps<{ nodes: readonly GeneralChildNode[]}>(); -const isLeafNode = (n: GeneralChildNode) : n is AnyLeafNode => n.definition.type === 'value-node'; -const isGroupNode = (n: GeneralChildNode) : n is GroupNode => n.definition.type === 'subtree'; -const isRepeatRangeNode = (n: GeneralChildNode) : n is RepeatRangeNode => n.definition.type === 'repeat-sequence'; +const isLeafNode = (node: GeneralChildNode): node is AnyLeafNode => { + return node.nodeType === 'string' || node.nodeType === 'select'; +}; +const isGroupNode = (node: GeneralChildNode): node is GroupNode => { + return node.nodeType === 'group'; +}; +const isRepeatRangeNode = (node: GeneralChildNode): node is RepeatRangeNode => { + return node.nodeType === 'repeat-range'; +};