Appearance
Function: fieldComparison()
ts
function fieldComparison(props: FieldComparisonProps): ReactElement;Defined in: src/UI/blocks/fieldComparison.tsx:43
Parameters
| Parameter | Type | Description |
|---|---|---|
props | FieldComparisonProps | Configuration object |
Returns
ReactElement
Deprecated
Use the equivalent block from @matterway/sdk/UI instead. This block targets the old showUI path and will be removed when src/UI/ is dropped.
Field comparison component for displaying a comparison between two fields.
Example
Basic usage with two fields
fieldComparison({
fields: [
{
field1: {
label: 'Document',
value: '2024-10-09',
},
field2: {
label: 'System',
validationMessage: 'Missing value',
value: '',
},
name: 'Effective Date',
ocrScore: 64,
result: 'error',
resultMessage: 'Not Matching',
},
],
});