Skip to content

Commit

Permalink
Fix fieldtype mapping after removal of FieldType in backend (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrinie-nc authored Feb 28, 2024
1 parent b5c7837 commit 79ccf8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/application/components/ApplicationAnswersField.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ApplicationAnswersField = ({
<Row>
{section.fields.filter((field) => field.enabled).map((field) => {
const fieldAnswer = answer.fields[field.identifier];
const fieldType = fieldTypes?.find((fieldType) => fieldType.value === field.type)?.display_name;
const fieldType = fieldTypes?.find((fieldType) => fieldType.value === field.type)?.value;

if (fieldType === 'hidden') {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ApplicationPreviewSection extends PureComponent<Props> {
};

const typeMapping = get(attributes, 'sections.child.children.fields.child.children.type.choices');
const matchingType = typeMapping.find((type) => type.value === field.type)?.display_name;
const matchingType = typeMapping.find((type) => type.value === field.type)?.value;

if (matchingType === 'hidden') {
return null;
Expand Down

0 comments on commit 79ccf8a

Please sign in to comment.