Skip to main content

QuestionnaireContent.Item

Renders the current questionnaire item for paged mode, automatically handling field type selection and conditional logic.

Overview​

The QuestionnaireContent.Item component automatically renders the current questionnaire item based on its FHIR type, handles conditional logic evaluation, and provides real-time validation feedback. It serves as the main content renderer for paged questionnaire navigation.

Props​

PropTypeDefaultDescription
styleStyleProp<ViewStyle>undefinedCustom styles for the item container
...viewPropsViewProps-All other React Native View props (testID, accessible, etc.)

Features​

  • Automatic Field Rendering: Selects appropriate field component based on FHIR item type
  • Conditional Logic: Evaluates enableWhen rules in real-time
  • Validation Integration: Shows required-field indicators. Inline validation text is rendered by Content.Error, not by Content.Item itself.
  • Accessibility boundary: The item forwards host view props; add labels, roles, and announcements around the rendered field where the app requires them
  • Custom Styling: Full control over item container appearance