@@ -5,10 +5,11 @@ import { Element } from 'react-scroll';
55
66import InputErrorMessage from 'components/InputErrorMessage' ;
77import LabelOptional from 'components/LabelOptional' ;
8- import { Heading } from 'design-system-react' ;
98import { TextInput } from 'components/TextInput' ;
10- import { DisplayField } from 'pages/Filing/ViewInstitutionProfile/DisplayField ' ;
9+ import { Heading } from 'design-system-react ' ;
1110import type { InputType } from 'design-system-react/dist/components/TextInput/TextInput' ;
11+ import type { DisplayFieldProperties } from 'pages/Filing/ViewInstitutionProfile/DisplayField' ;
12+ import { DisplayField } from 'pages/Filing/ViewInstitutionProfile/DisplayField' ;
1213
1314interface InputEntryProperties extends ComponentPropsWithoutRef < 'input' > {
1415 id : string ;
@@ -24,7 +25,10 @@ interface InputEntryProperties extends ComponentPropsWithoutRef<'input'> {
2425 helperText ?: string ;
2526}
2627
27- const InputEntry = forwardRef < HTMLInputElement , InputEntryProperties > (
28+ const InputEntry = forwardRef <
29+ HTMLInputElement ,
30+ DisplayFieldProperties & InputEntryProperties
31+ > (
2832 (
2933 {
3034 className = '' ,
@@ -40,6 +44,7 @@ const InputEntry = forwardRef<HTMLInputElement, InputEntryProperties>(
4044 isOptional = false ,
4145 type = 'text' ,
4246 helperText,
47+ fallbackValue,
4348 ...properties
4449 } ,
4550 reference ,
@@ -78,7 +83,13 @@ const InputEntry = forwardRef<HTMLInputElement, InputEntryProperties>(
7883 />
7984 </ >
8085 ) }
81- { hideInput ? < DisplayField label = { label } value = { children } /> : null }
86+ { hideInput ? (
87+ < DisplayField
88+ label = { label }
89+ value = { children }
90+ fallbackValue = { fallbackValue }
91+ />
92+ ) : null }
8293 { handleError ? (
8394 < div >
8495 < InputErrorMessage > { errorMessage } </ InputErrorMessage >
0 commit comments