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
| Prop | Type | Default | Description |
|---|---|---|---|
style | StyleProp<ViewStyle> | undefined | Custom styles for the item container |
...viewProps | ViewProps | - | 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
enableWhenrules in real-time - Validation Integration: Shows required-field indicators. Inline validation text
is rendered by
Content.Error, not byContent.Itemitself. - 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